Jump to content

[SOLVED] mysql change field


PICS

Recommended Posts

I'm trying to change a field after the security code is valid but i don't think my code is right to change the field. Help me out please :]

 

<?PHP

$sc2=$_GET['sc'];

$username="teteted";
$password="dfsfsdf";
$database="picstools_com_-_u";


mysql_connect('localhost',$username,$password);
$query1=" UPDATE sms SET verify='yes' WHERE sc='$sc2'";
mysql_query($query1);
echo "Record Updated";

@mysql_select_db($database) or die( "Unable to select database");
$query=" SELECT * FROM sms WHERE sc='$sc2'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();

$i=0;
while ($i < $num) {
$id=mysql_result($result,$i,"id");
$cell=mysql_result($result,$i,"cell");
$pw=mysql_result($result,$i,"pw");
$sc3=mysql_result($result,$i,"sc");
$vi="yes";


echo '<h1>Congratulations!</h1><br><br>Your Phone Number '.$cell.' Has Been Registered.';

++$i;
}
?>

Link to comment
https://forums.phpfreaks.com/topic/59499-solved-mysql-change-field/
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.