starvator Posted July 11, 2009 Share Posted July 11, 2009 im trying to use php to post to a mysql database... the table and stuff already exists, but i want to make it possible for someone to modify an entry... here is my code: <h1>Member Area</h1> <p>Thanks for logging in! You are <b><?=$_SESSION['Username']?></b> and your email address is <b><?=$_SESSION['EmailAddress']?></b>.</p> <br><br><p><font color="red">The below fields must be filled out to quality for any of the giveaways.</font></p> <table border="0"> <tr> [color=red]<form action="youtube.php" name="registration" method="post">[/color] <td>Youtube Username:</td> <td>[color=red]<input type="text" name="youtube" value="<?=$_SESSION['youtube']?>">[/color]</td> <td><input type="submit" value="Update"></td> </form> </tr> </table> </form> does this work? if so, what do i put on youtube.php. THANKS Link to comment https://forums.phpfreaks.com/topic/165636-im-trying-to-use-php-to-post-to-a-mysql-database/ Share on other sites More sharing options...
megaresp Posted July 11, 2009 Share Posted July 11, 2009 It's not really clear from your post whether or not this will work, because it's not clear what you're trying to do. The code snippet you posted displays a form with one field in it. If filled out and the Update button clicked, it will POST that data to the script youtube.php. You talk about updating a table, which I assume is done by the script youtube.php. As you haven't supplied that script, it's not possible to comment on whether or not this will actually happen. Link to comment https://forums.phpfreaks.com/topic/165636-im-trying-to-use-php-to-post-to-a-mysql-database/#findComment-873738 Share on other sites More sharing options...
starvator Posted July 11, 2009 Author Share Posted July 11, 2009 You talk about updating a table, which I assume is done by the script youtube.php. As you haven't supplied that script, it's not possible to comment on whether or not this will actually happen. what im trying 2 say is that i need someone to help me create youtube.php Link to comment https://forums.phpfreaks.com/topic/165636-im-trying-to-use-php-to-post-to-a-mysql-database/#findComment-873745 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.