I think the code below is pretty simple...
Can anyone suggest ANY way to do the bit in my last comment block???

thanks in advance!
Jaxon

<?

//set some variables or include, etc.

$id=1;
$usr="user";
$pass="pass";
$database="database";
$sql="select * from table where id = $id";

//identify connection handle

$link_id = mysql_connect($database);

//test for connection handle

if (!$link_id)
    {
    die(sql_error());
    }

else    {
    mysql_select_db($database, $link_id)
    }

//return result set to php

$result = mysql_query($sql, $user, $pass);

//create array consisting of result set and field names
//eg $page_array[first] contain value of field 'first' for $id

$page_array = mysql_fetch_array($result);

//where field names e.g.{main_content} are found in an html layout file,
replace with result set elements
//TEMPLATE GOES HERE ?
//spit out resultant page to browser


?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to