Ok -- Still no luck yet.
So, WHERE in this code should I add "addslashes()" in order for entries into my webform to be able to use " ' " marks (ie...Guido's Pizza, and not Guidos -- or Smith's Beer Hall, not Smiths). Check it:
<?php
if ((!$title) || (!$description) || (!$keywords) || (!$url) || (!$email) || (!$location) || (!$channel)) { header("Location: http://www.dstco.com/mithra/add_url.htm");
exit;
}
?>
/ Title, Description, Keywords should have addslahes() capability. /
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Added Record</title>
</head>
<body>
<H1>Site Submission</H1>
<?php
$sql = "INSERT INTO url_store VALUES (title, description, keywords, url, email, location, channel);
$connection = mysql_connect("localhost","abcde","123456789") or die ("Couldn't connect to server.");
$db = mysql_select_db("abc_123", $connection) or die ("Couldn't select database.");
$sql_result = mysql_query($sql,$connection) or die ("Couldn't execute query.");
if (!$sql_result) {
echo "<P>Couldn't submit URL!";
} else {
echo "
<P>Site Submitted! Please allow up to 4 weeks for your submission to appear in our database.</P>
<table cellspacing=5 cellpadding=5>
<tr>
<td valign=top<strong>URL Title:</strong></td>
<td valign=top>$title</td>
</tr>
<tr>
<td valign=top<strong>Description:</strong></td>
<td valign=top>$description</td>
</tr>
<tr>
<td valign=top<strong>URL</strong></td>
<td valign=top>$url</td>
</tr>
<tr>
<td valign=top<strong>Geographical Location:</strong></td>
<td valign=top>$location</td>
</tr>
</table>
";
}
?>
</body>
First one to help me gets a free beer if they visit Prague. 🙂
Guido