Jump to content

[SOLVED] A php file question


forumnz

Recommended Posts

They could be using a mySQL database or just files.

Basically if they used a mysql database it would be something like:

[code]
$id = $_GET['id'];
$cat = $_GET['cat'];

if(!isset($id)){
$id = 1;
}
if(!isset($cat)){
$cat = 1;
}

$sql = "SELECT * FROM `pages` WHERE `pageid` =$id AND `cat` =$cat";
$res = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_assoc($res);

echo "page title: $row[title]<br>author: $row[author]<br><br>\n";
echo "contents: $row[pagecontents]";
[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.