maxbox Posted January 1, 2009 Share Posted January 1, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.