0

Hi!

I have basic input form, which right now saves what i input into a txt file
Now, i want to save/add that into a table (not mysql one, just a table on a page that anyone can see) so, i was wondering if there is any example code, or someone knows how this could be done

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by sourcebits
0

If you know PHP and mysql it will help. If you are new, you may read some example scripts on database management from hotscripts.com and simlar sites exists
on web. You may also find a php coder to do this job.

In this state, i could write the add part as below on page test.php form action being same as test.php.

page name : test.php

<?php
mysql_connect('localhost','username','password');
mysql_select_db($mydbname);

if(isset($_POST) && $_POST!=''){
$email = $_POST;
mysql_query("insert into mytable(email) values('$email')");
print 'Successfully added';
}
?>
<form action="test.php" method="post">
Email<input type="text" name="email" value="">
<input type="submit" name="save" value="save">
</form>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.