Ave! There's my issue. Everything works at localhost. There's an button on the webside:
<INPUT Type="BBUTTON" Value="go to search engine" Onclick="window.location.href='http://localhost/public_html/search/'">
There's a code like this (double B above I pressed cause there was error during porting here. Normally is one b).
Files in folder search:
index.php
There the line like this:
<form method="get" action="results.php">
<input type="text" name="search"><br>
Next:
> <?php
>
>
>
> header("Content-Type: text; charset=utf-8");
> mysql_connect("localhost","login","passtoadminside") or
> die(mysql_error());
> mysql_select_db("franklyIamnotsuremaybetableinmysqlname") or
> die(mysql_error());
>
>
> $clean = mysql_real_escape_string($_GET['search']); $hello =
> mysql_query("SELECT * FROM items WHERE description LIKE '%$clean%'")
> or die(mysql_error()); if (mysql_num_rows($hello) >= 1){ while($i =
> mysql_fetch_array($hello)) { echo '<a
> href="'.$i['url'].'">'.$i['title'].'</a><p>'.$i['description'].'</p>';
> } } else { echo "Nothing."; }
>
> ?>
file result.hph
<?php
header("Content-Type: text; charset=utf-8");
mysql_connect("localhost","login","pass to adminside") or die(mysql_error());
mysql_select_db("franklyIamnotsuremaybetableinmysqlname") or die(mysql_error());
$clean = mysql_real_escape_string($_GET['search']);
$hello = mysql_query("SELECT * FROM items WHERE description LIKE '%$clean%'") or die(mysql_error());
if (mysql_num_rows($hello) >= 1){
while($i = mysql_fetch_array($hello)) {
echo '<a href="'.$i['url'].'">'.$i['title'].'</a><p>'.$i['description'].'</p>';
}
}
else {
echo "No hope";
}
?>
I am stuck, whole page works fine, end of hope begins after pushing button. Works perfect with XAMPP on linux. I've been working on it for few weeks. I've just tried make search engine to my books collection. I trusted him: https://www.youtube.com/watch?v=gQs-TR5jdmU
Pax.