Posted by Peace on 01/23/06 09:00
all you need to know is basic programming php&mysql:
example:
<!-- CONNECT TO YOUR DB -->
<?php
if (!$link = mysql_connect('mysql_host', 'mysql_user',
'mysql_password')) {
echo 'Could not connect to mysql';
exit;
}
if (!mysql_select_db('mysql_dbname', $link)) {
echo 'Could not select database';
exit;
}
?>
<!-- FORM TO ENTER EMAIL -->
enter you email here
<FORM METHOD=POST ACTION="this.php">
<INPUT TYPE="text" NAME="email"> <INPUT TYPE="submit">
</FORM>
<!-- SAVING EMAIL -->
<?
if ($email!="") {
$sql = 'insert into foo set email='$email' ';
$result = mysql_query($sql, $link);
}
?>
more information on php.net
[Back to original message]
|