Smicks Posted April 13, 2007 Share Posted April 13, 2007 Alright, this may be pretty simple, but I'm a PHP noob so whatever. I have a text field that I want the users to enter a value into, and then they hit submit. Then i want that value to be stored server-side until another user comes along and decides to change it. The current code I have is: <head> <title>Changing the Value</title> </head> <?php $value = $_GET['value']; ?> <body> <form action="value.php" method="submit"> <tr> <td>Change the value: </td> <td align="center"> <input type="text" name="value" size="20" maxlength="20" /></td> </tr> <tr> <td colspan="2" align="center"><input name="submit" type="submit" value="Update" /></td> </tr> </table> </form> <?php echo 'the current value is '.$value.'.'; ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
HeyRay2 Posted April 13, 2007 Share Posted April 13, 2007 You'll need to store this value on the server, either in a text file or database of some sort. Search the forums for keywords related to saving to text files or databases, and you should get on the right track. Quote Link to comment Share on other sites More sharing options...
clown[NOR] Posted April 13, 2007 Share Posted April 13, 2007 fopen() - http://no2.php.net/manual/en/function.fopen.php fwrite() - http://no2.php.net/manual/en/function.fwrite.php fclose() - http://no2.php.net/manual/en/function.fclose.php fread() - http://no2.php.net/manual/en/function.fread.php Quote Link to comment 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.