cdoyle Posted March 23, 2008 Author Share Posted March 23, 2008 This is a page I'm creating to work with EzRPG $player = check_user($secret_key, $db); which pulls the current player info from function.php This code here, works for pulling the correct cities $querycity2 = $db->execute("SELECT * FROM Cities Where $player->level >= Minimum_Level"); echo "<table width=\"100%\">\n"; echo "<tr class=\"cellheader\"><td><div align=\"center\">Wanna Go Somewhere do ya?</div></td></tr><tr>\n"; echo "<td><div align=\"center\">Here are the cities that you can go too.</div></td></tr><tr>\n"; echo "<td>\n"; while ($getcity2 = $querycity2->fetchrow()) echo $getcity2['City_Name'] . "<br />"; echo "</td>\n"; echo "</tr></table>\n"; ?> But I didn't know how to make each city be a link, that updates the City_ID field in the player table. That's where redarrow has been helping me, but I can't seem to get it to work. That's when I noticed his select is different from what I had. If anyone has any other suggestions on how to create a query that will pull the correct cities based on the players level, and then make it so they can click on a city, which will update their City_ID in their player table. Please respond. Quote Link to comment Share on other sites More sharing options...
cdoyle Posted March 24, 2008 Author Share Posted March 24, 2008 Does anyone else have any suggestions? I'm totally stuck on this There has to be a way, to pull up a list of cities based on the players level. Then make it so when the user clicks on a city, it updates the city_id in the players table. The select pulls the correct cities $querycity2 = $db->execute("SELECT * FROM Cities Where $player->level >= Minimum_Level"); but earlier it was stated that it's not valid SQL. I'm new too this, if it's not valid, how is it pulling the right info? If anyone is not familiar with ezRPG, the pages use Adodb. $player is getting it's information from function.php . include("lib.php"); $player = check_user($secret_key, $db); Not sure if it helps, but here is a zip with both the drive.php and the function.php http://www.caraudiocentral.net/CAC_Mafia_Life/New%20Folder.zip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.