Newbie here so please be gentle.
Im sure this question has been asked 1,000's of times but I am really struggling being new to PHP & mysql and using code copied from a book.
All I want to is pass a variable from a url to a mysql query:
id is the variable i want to pass to the SELECT command in caravan_details.php
I have the follwing in for_sale.php:
echo '<a class="caravan-moredetails" href="caravan_details.php?id=' .$row['id']. '">More information »</a>';
I want to pass id as an integer variable to caravan_details.php and im using the following SELECT query:
$id = $_GET['id']
$result = @mysql_query("SELECT * FROM caravans WHERE id='$id'");
I want to pass the variable direct from the URL, not using a form
Thank you :)