vinitkumardesai
New Member
header.php\[code\]<?php$conn = mysql_connect('localhost', '-', '-');@mysql_select_db('accmaker', $conn) or die("Unable to select database");?><html><head><title>Mysite.com - <?php isset($pageTitle) ? $pageTitle : 'Home'; ?></title></head><body>\[/code\]profile.php\[code\]require 'header.php';$q = mysql_query("SELECT * FROM users WHERE username = '$username'");$r = mysql_fetch_assoc($q);$pageTitle = "Profile of $r[username]";\[/code\]I think you understand what i wantI cant include header.php after the query, because i wont be connected to mysqlwaht do you suggest other than having the connection snippet on every page