Log in

View Full Version : My first attempts at php



lmellor
11-26-2008, 03:00 PM
Hi, I have recently been putting a site together and have decided to dabble in the world of php. Having figured out how to include an external text file in a div I am now stuck at how to make links in my nav bar which will swap the content from one text file to another when a user clicks the link.

Hopefully this makes some sense and somebody can help me, I have been told that I need to set the url of each link to pass a variable to a script in order to achieve this, the only problem is that I simply don't understand how.

My basic understanding is that I would set a 'target' (for want of a better word) within my main content div, somewhere in my head section I would have a list of variables (I've no idea where to start with that) and that my links would simply tell the browser to load the file set within the variable in the target div.

Seriously, if someone could point me at a tutorial for this or even better word it in complete layman's terms then I'd be very very grateful.

TIA.

Luke.

NXArmada
11-26-2008, 07:25 PM
http://www.php-mysql-tutorial.com/

JasonDFR
11-30-2008, 05:55 PM
You must go through the tutorials on the web. I also highly recommend this book: PHP 6 and MySQL 5 by Larry Ullman Visual Quickpro Guide. You don't need PHP 6 to go through the book.

And you really shouldn't include text files (.txt) if that is what you are doing. Just make all your included files end in the .php extension.

Good luck,

Jason