Jump to content

Help with creating hyperlink.


cdoyle

Recommended Posts

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.

 

 

 

Link to comment
Share on other sites

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

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.