PHP variable import
Posted: Sat Nov 20, 2010 9:04 pm
I need help!
In my php scripts, i have multiple pages connecting to more than one database. I need to know how to add a variable into an external page that i will link in the other pages.
like so:
How do I get this from a page and link that page to another page without typing all of this out?
In my php scripts, i have multiple pages connecting to more than one database. I need to know how to add a variable into an external page that i will link in the other pages.
like so:
Code: Select all
<?php
$connect = mysql_connect("localhost","root","") or die ("Error: Cannot connect to host");
mysql_select_db("com") or die ("Error: Cannot connect to database");
$queryget = mysql_query("SELECT * FROM user ORDER BY id ASC") or die ("Error: Invalid Query");
?>