Jump to content

help, php mysql


maxbox

Recommended Posts

hello

        I need change this code  can you help me...

 

I need delete the values code from jos_call  after validate and insert this to another tables  jos_call1

 

If code true  delete code  from jos_call  and insert the code in to jos_call1.

I must have a valid code only one time .

 

<?php


$mysql_host="XXXXXXXX";
$mysql_user="XXXXXX";
$mysql_password="XXXXXXXXX";
$mysql_db = "XXXXXXX"; 


$conn = mysql_connect("$mysql_host","$mysql_user","$mysql_password")or die("Could not connect : " . mysql_error());
mysql_select_db("$mysql_db",$conn) or die("Select database failed"); 


$var=@$_REQUEST['nombre']."'";
$query= mysql_query("Select * from jos_call where code = '".$var,@$conn);
if (mysql_num_rows($query) == 0 )  {
echo @$_REQUEST['nombre'].'  Su codigo 6 digitos.Codigo no valido.';
}else{
echo @$_REQUEST['nombre'].'  Codigo correcto! ' ;
}
mysql_close($conn);

?>

Link to comment
https://forums.phpfreaks.com/topic/139134-help-php-mysql/
Share on other sites

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.