XxDeadmanxX Posted October 2, 2007 Share Posted October 2, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.