Zend - The PHP Company




Email

Add Code


kazanoglu  

Type: application
Added by: kazanoglu
Entered: 04/07/2000
Last modified: 08/12/1999
Rating: **** (3 votes)
Views: 8029
insert user and sent mail


************************************************************
html
************************************************************
<form action="insert.php" method="post">
  <table width="707" border="1" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      <td width="360" align="right">&nbsp;</td>
      <td width="404">&nbsp;</td>
    </tr>
    <tr> 
      <td width="360" align="right">User ID</td>
      <td width="404" align="left"><?php echo $userid?></td>
    </tr>
    <tr> 
      <td width="360" align="right">User Name</td>
      <td width="404" align="left"> 
        <input type="text" name="username">
      </td>
    </tr>
    <tr> 
      <td width="360" align="right">Name</td>
      <td width="404" align="left"> 
        <input type="text" name="name">
      </td>
    </tr>
    <tr> 
      <td width="360" align="right">Surname</td>
      <td width="404" align="left"> 
        <input type="text" name="surname">
      </td>
    </tr>
    <tr> 
      <td width="360" align="right">Telephone</td>
      <td width="404" align="left"> 
        <input type="text" name="telephone">
      </td>
    </tr>
    <tr> 
      <td width="360" align="right">Fax</td>
      <td width="404" align="left"> 
        <input type="text" name="fax">
      </td>
    </tr>
    <tr> 
      <td width="360" align="right">Email</td>
      <td width="404" align="left"> 
        <input type="text" name="email">
      </td>
    </tr>
    <tr> 
      <td width="360" align="right">Web Page</td>
      <td width="404" align="left"> 
        <input type="text" name="webpage">
      </td>
    </tr>
    <tr> 
      <td width="360" align="right">Address</td>
      <td width="404" align="left"> 
        <textarea name="address"></textarea>
      </td>
    </tr>
</table>
</form>

************************************************************
insert.php
************************************************************

<?php
$hostname
="localhost:3306";
$root="root";
$pass="pass";
$databese="guid10";
$dbh MYSQL_CONNECT($hostname$root$armada) OR DIE ("not Connect");

MYSQL_SELECT_DB('guid10') or die("not selected DB!");

?>
<html>
<head>
</head>     

<?php
$userselect 
"";
$password "adfQR309"
$name strtoupper($name);
$sql "INSERT INTO users (userid, username, password, name, surname, telephone, fax, email, webpage, address) VALUES ($userid, '$username', '$password', '$name', '$surname', '$telephone', '$fax', '$email', '$webpage', '$address')";

$sth =  MYSQL_DB_QUERY("guid10",$sql) or die ("$sql <br>Hata var");

$message "hiii $name $surname n Username : $username n Password : $passwordn ";
mail("$email""http://www.ispro.net.tr/"$message,"From: adil@ispro.net.trReply-To: adil@ispro.net.trn")?>
<body bgcolor="#000000" text="#ffffff">
<br>ok !<br>
<?php
MYSQL_CLOSE
();
?>
</body>
</html>



Usage Example




Rate This Script





Search



This Category All Categories