Well Im having a little trouble with this, Ive converted my access database to a mysql database and now im converting asp script to php.
Everything is working but two things
one is the url, I cannot send variables thru a url string, very weird. This is on IIS with PHP 4.2.3
now the next thing is, trying to take a record form the database and put it in a LIKE statement
$test = addslashes("Alberto Martinez\\2002 Digital photos\\Eastvale Line E 5-1-2002");
$test2 = "Alberto Martinez\2002 Digital photos\Eastvale Line E 5-1-2002";
$test2 = ereg_replace("€1", "\\2001 ", $test2);
$test2 = ereg_replace("€2", "\\2001 ", $test2);
$test2 = addslashes($test2, $test2);
$connect = mysql_connect("localhost", "root", "") or die ("Couldnt connect");
$db = mysql_select_db("Photos", $connect) or die ("Couldnt open Database");
$sql = "select * from photos WHERE PhotoLocation = '$test' Order by Photoid ASC LIMIT 0,24";
$sql_result = mysql_query($sql, $connect) or die ("Access Denied!");
echo "<center>Location: $test2<br>$test</center><br>";
while ($row = mysql_fetch_array($sql_result)){
$rs_fld1 = $row["PhotoName"];
$rs_fld2 = $row["PhotoLocation"];
$rs_fld3 = $row["PhotoThumbnail"];
}
now i have added $test2 as a phonny record from the database
the problem is the \
If I use $test in the LIKE string it works. But If I use the $test2 it comes up with a blank screen
another thing, I keep getting this from $test2 €
this is a real record thats in the databse already
$test2 = "Alberto Martinez\2002 Digital photos\Eastvale Line E 5-1-2002";
any ideas