Jump to content

Form Processing


Daney11

Recommended Posts

Hi guys.

 

Im stuck on something probably very simple.

My question is, I have created a form, with values within a script and a submit button. I want to use the form on the same script... For example

 

update_value.php

<form method="post" action="update_value.php">
<table width="654" cellpadding="0" cellspacing="0" align="center" class="outline">
<tr> 
<td width="168" height="20" align="left" valign="middle"><?php echo " $name "; ?>
<td width="168" height="20" align="left" valign="middle"><input class="shoutbox" name="value" type="text" value="<?php echo "$value" ?>" /></td>
<td width="318" height="20" align="left" valign="middle">
<select name="123" class="shoutbox">
<option value=1 selected>Goodbye</option>
<option value=2>Hello</option>
</select></td>
</td>
</tr>
</table>
<table width="654" cellpadding="0" cellspacing="0" align="center">
<tr> 
<td height="1"><img src="images/1pspacer.gif"></td>
</tr>
</table>
<table width="654" cellpadding="0" cellspacing="0" align="center" class="outline">
<tr> 
<td height="20" colspan="10" align="center" valign="middle"><input name="give" type="submit" class="shoutbox" value="Submit"></td>
</tr>
</table>
<table width="654" cellpadding="0" cellspacing="0" align="center">
<tr> 
<td height="1">images/1pspacer.gif"></td>
</tr>
</table>
</form>

 

Now, if i was to click on submit and run this script, how would i go about updating tables in my database with the $value attribute..?

 

Thanks

 

Dane

Link to comment
https://forums.phpfreaks.com/topic/43179-form-processing/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.