Jump to content

Recommended Posts

hi, i'm a newbie at this php thing.

I have a file called home.html

which 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
Link to comment
https://forums.phpfreaks.com/topic/11065-easy-questions-newbie/
Share on other sites

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?
Link to comment
https://forums.phpfreaks.com/topic/11065-easy-questions-newbie/#findComment-41352
Share on other sites

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 ..
Link to comment
https://forums.phpfreaks.com/topic/11065-easy-questions-newbie/#findComment-41353
Share on other sites

[!--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
Link to comment
https://forums.phpfreaks.com/topic/11065-easy-questions-newbie/#findComment-41706
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.