Help, Trying to Call in an ID from a table


#1

DELETED


#2

First thing, I only mention this as I didn’t know until someone showed me and I have been doing this ever since…

Code Formatting -

[php]
if($variable == “something”)
{
//Code Here
}
else
{
if($variable2 == “somethingelse”)
{
//Code Here
}
//CODE HERE
}
[/php]

This is just a matter of readablity and preferance. If you like your way better that is fine, I just like pointing out this way as I found it saves me hours of debug time.

Anyway On to your problem…

[php]

<? $id = $row['id_field']; ?>

[/php]

<a href="www.mywebsite.com/index.php?id=<? echo $id;?>" target="_self">New Link - <? echo $id;?> </a>

Output will be - A link that says: New Link - 1 Which will lead to

http://www.mysite.com/index.php?id=1

Also - You will need to use $_GET[‘id’] to get the value from the URL.
Just incase you didn’t know.

Hope that helps… The code is provide as a guide only. I did not test it. There may be some errors, but should be able to get what you need from what I have provided.