Jump to content

Help with a php script


virtualviadas

Recommended Posts

Hello

I am a newbie and I need some help.

What I need is to know if some one can tell me or point me out where I can find a PHP script that do this:

The php script I request is for a registration form.

The script should check if the serial number wrote by the user in the registration form, exist in a SQL table.

If it exist the data is saved in a sql data base, if it doesn't exist, the user should receive a error message.

Also, it should show an error message if the user tries to register the same serial number twice.

 

By the way I need other 3 scripts:

One should send a confirmation e-mail from the registration form, to tell the user his data has been succesfully received.

The other script should take the user name and his/her serial number from the sql table and post it in two fields on a php script.

 

 

Link to comment
https://forums.phpfreaks.com/topic/175968-help-with-a-php-script/
Share on other sites

first script:

//$serial is the output of the form
$query = "SELECT serial_id FROM serials WHERE serial_key = '$serial'"
$result = mysql_query($query)
if(num_rows($result)<0){
echo "WRONG!"
}else{
//actions if you typ the right serial
}

 

second script:  Use the mail function

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.