What code does the for_sale.php generate (view source in a browser) - is the number in there ? -> if not: that's where you need to look at. E.g. do you have a column "id" (or did you name something id in the select statement)?
If that works, did you try to call caravan_details.php?id=1 (presuming there's such a record in your database) directly.
For the rest: I'd be extremely careful with this type of code: you really need to do strong input validation. Just image somebody would call is with a parameter containing 1';drop table caravans;' -> yeah: bye bye table.
For the rest: - use the mysqli interface (note the i), not the mysql one (it is obsolete). - use prepared statements (much easier to secure).
Depending on context: - htmlencode your output to prevent problems with quotes, and tags (or at least xmlencode the 5 allowed entities. - urlencoding might be needed as well.
Unfortunately 99% of books and tutorials do not teach security along with it all, leaving you extremely vulnerable - remmebr that the examples you rely on are very insecure and need a lot of work to become secure.
At the moment, this is only running on my home PC and is a development site to help me get back into things so security, currently, is no real concern although thanks for the pointers and im sure they will come in handy soon!
With regards to the other bits, for_sale.php generates a basic list of all rows in table caravans and displays them on the page in id number order therefore the id field is already requested from the database when for_sale.php is loaded. It is then passed to caravan_details.php (a more detailed listing of whichever table row is selected) using the code in my first post.
Whilst the output is formatted almost correctly, no values appear in the fields as id is not being picked up from caravanid (or selected from the db correctly).