brcolow
09-22-2002, 05:14 PM
Hey i have this code...
<?
if (!$title || !$about || !$title || !$source)
{
echo "You have not completed all of the required feilds in your article report.<br>"
."please go back and try again.";
exit;
}
$title = addslashes($title);
$about = addslashes($about);
$screenshots = addslashes($screenshots);
$source = addslashes($source);
@ $db = mysql_pconnect("localhost", "mike", "notshown");
if (!$db)
}
echo "Could not connect to database.";
exit;
}
mysql_select_db("news");
CREATE TABLE articles (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
article CHAR(100000) NOT NULL,
PRIMARY KEY (id)
);
$query = "inert into articles (article) values
('".$title"', '".$about."', '".$screenshots"', '".$source."')";
$result = mysql_query($query);
if ($result)
echo mysql_affected_rows()." Article insterted into database.";
?>
Now, i want to be able to make it so people can go to the page articles.php?id=whatever how do i do that?
<?
if (!$title || !$about || !$title || !$source)
{
echo "You have not completed all of the required feilds in your article report.<br>"
."please go back and try again.";
exit;
}
$title = addslashes($title);
$about = addslashes($about);
$screenshots = addslashes($screenshots);
$source = addslashes($source);
@ $db = mysql_pconnect("localhost", "mike", "notshown");
if (!$db)
}
echo "Could not connect to database.";
exit;
}
mysql_select_db("news");
CREATE TABLE articles (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
article CHAR(100000) NOT NULL,
PRIMARY KEY (id)
);
$query = "inert into articles (article) values
('".$title"', '".$about."', '".$screenshots"', '".$source."')";
$result = mysql_query($query);
if ($result)
echo mysql_affected_rows()." Article insterted into database.";
?>
Now, i want to be able to make it so people can go to the page articles.php?id=whatever how do i do that?
