0

Hi Guys

I need your help as what i am trying to develop is doing me head in :-)

I am developing a PHP form which basically adds two variable together. The final number then needs to placed in to a HTML url which triggers the image to be loaded on the next page. I am having problems creating the 'html link' on the echo request. Upon submission the url( with the number) needs to open in the same window.

the html link code looks like this:

index.htm?pic=4

What i need to know is how do put added together number in place of the 4.

Below is the script for adding the numbers together:

<?
if ($_POST['submit']) {
$frame1 = $_POST['frame1'];
$mount1 = $_POST['mount1'];

$num1 = $frame1 + $mount1;
echo "<a href="\index.htm?pic=".$num1."\">"</a>; 
}
?>

What is the correct form to put $num1 into the url??

Hope you can help!
Thanks
Rob

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by Puckdropper
0

The way you've done it looks ok. My psychic debugging skills, however, are telling me it's something more...

You do know that variables in the URL are GET variables and not POST?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.