Jump to content

Promo script (HELP PLEASE!@!@!!!)


XxDeadmanxX

Recommended Posts

Ok im making a promo script that gives the user the special promo but it seems not to work can someone help me .

 

<?php

$result = mysql_query("SELECT * FROM dbUsers where username= '". $_SESSION['valid_user']."'") or die(mysql_error());
$row = mysql_fetch_array($result);
if($row['promo']=="Yes")
{
echo "<br />Sorry, trainer ".$_POST['username']." you already have the pokemon.<br /><br />";
exit;
}
if ($row['promo']=="No") {
   echo "YOU GOT THE PROMO!!!!";
mysql_query("INSERT INTO pokemons (username, pokemon) VALUES('. $_SESSION["valid_user"].', 'BALBA' ) ") 
or die(mysql_error());  
mysql_query("UPDATE dbUsers SET promo='Yes' WHERE username='. $_SESSION["valid_user"].' ");
} else {
echo "You already took the PROMO!.";
}
?>

Link to comment
https://forums.phpfreaks.com/topic/71569-promo-script-help-please/
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.