•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,466 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,776 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 424 | Replies: 2
![]() |
•
•
Join Date: Sep 2007
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 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:
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:
What is the correct form to put $num1 into the url??
Hope you can help!
Thanks
Rob
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=4What 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
Last edited by stagnation : Sep 11th, 2007 at 12:56 pm.
•
•
Join Date: Jul 2004
Location: North East Indiana
Posts: 491
Reputation:
Rep Power: 5
Solved Threads: 20
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?
You do know that variables in the URL are GET variables and not POST?
www.uncreativelabs.net
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the PHP Forum
- Previous Thread: Javascript Variables in PHP
- Next Thread: Pass Javascript variable to PHP code



Linear Mode