GoDaddy Posted June 3, 2006 Share Posted June 3, 2006 hi, i'm a newbie at this php thing. I have a file called home.htmlwhich is like this [code]<form action="processorder.php" method="POST"><html><body><table><tr><td>Tires</td><td><input type="text" name="textboxTires" size="3" maxlength="3"/></td></tr><tr><td colspan="2"><input type="button" value="Submit"/></td></tr></table></body></html></form>and my processorder.php is like this<?php $tires = $_POST['textboxTires']; ?><?php echo $tires.'tires<br/>'; ?>[/code]when i click on Submit .. nothing happens .. Am I missing something here? I thought that the submit button would of done a post and would of called the processorder.php ... Also, is there anywhere on the net that teaches how to use Zend Studio? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/11065-easy-questions-newbie/ Share on other sites More sharing options...
AndyB Posted June 3, 2006 Share Posted June 3, 2006 Your html is wrong - you can't put elements OUTSIDE the file. Try this instead:[code]<html><body><form action="processorder.php" method="POST"><table><tr><td>Tires</td><td><input type="text" name="textboxTires" size="3" maxlength="3"/></td></tr><tr><td colspan="2"><input type="button" value="Submit"/></td></tr></table></form></body></html>[/code]Learn Zend Studio? Zend maybe? The documentation that came with it, maybe? Quote Link to comment https://forums.phpfreaks.com/topic/11065-easy-questions-newbie/#findComment-41352 Share on other sites More sharing options...
GoDaddy Posted June 3, 2006 Author Share Posted June 3, 2006 i've found my error .. it was in the input type .. it was button ... i've changed it to submit .... So it raises another question .. when the type is of button .. how do you tell the button that when the user clicks on it .. to do a post to the processorder.php?[!--quoteo(post=379519:date=Jun 2 2006, 10:44 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Jun 2 2006, 10:44 PM) [snapback]379519[/snapback][/div][div class=\'quotemain\'][!--quotec--]Your html is wrong - you can't put elements OUTSIDE the file. Try this instead:[code]<html><body><form action="processorder.php" method="POST"><table><tr><td>Tires</td><td><input type="text" name="textboxTires" size="3" maxlength="3"/></td></tr><tr><td colspan="2"><input type="button" value="Submit"/></td></tr></table></form></body></html>[/code]Learn Zend Studio? Zend maybe? The documentation that came with it, maybe?[/quote]Thanks! that was a mistake .. Quote Link to comment https://forums.phpfreaks.com/topic/11065-easy-questions-newbie/#findComment-41353 Share on other sites More sharing options...
kenrbnsn Posted June 3, 2006 Share Posted June 3, 2006 If you have a button of type "button", not "submit", the only way to make it work is to use Javascript.Ken Quote Link to comment https://forums.phpfreaks.com/topic/11065-easy-questions-newbie/#findComment-41380 Share on other sites More sharing options...
GoDaddy Posted June 4, 2006 Author Share Posted June 4, 2006 [!--quoteo(post=379549:date=Jun 3 2006, 01:00 AM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Jun 3 2006, 01:00 AM) [snapback]379549[/snapback][/div][div class=\'quotemain\'][!--quotec--]If you have a button of type "button", not "submit", the only way to make it work is to use Javascript.Ken[/quote]Im also not familiar with javascript. So i guess there's will be something like onlick="the javascript function"but then again in that javascript function... how do call another php file? like how can it call my file processorder.php ... which will process the order from the home.html file?Thanks Quote Link to comment https://forums.phpfreaks.com/topic/11065-easy-questions-newbie/#findComment-41706 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.