Tuesday, June 17, 2008

I ve already created all user interfaced pages including the upload form and the page to show the video.I ve created the database where the video file info will be stored.The website and database resides on the main server. I need a solution and script to upload a video file which is to be compressed and stored in the database. The script should be in php and mysql

I need a Good web hosting
allows favicon
upload htm - html files and stuff
php
mysql
almost perfect
But for free
Thanks
( Not geocities please and googlepages)
free ones..........

<form method="post" action="search.php">
User: <input type="text" name="username">
Password:<input type="password" name="password">
Search for: <input type="text" name="search">
<input type="submit" name="submit" value ="Search">
</form>


//search.php


If ($_POST[submit] {

mysql_connect("mysql"- $user- $pass)
Or die(mysql_error());
echo "<p>Thanks for using PowerSearch. Your search results for <b>$_POST[search]</b> are: </p>";
mysql_select_db("Country");
$query = "select * from Articles where Author like %$_POST[search]% ";
$result = mysql_query($query);

echo "<table width= 600 border= 1 cellpadding= 5 ><tr>";
echo "<th align= left width= 200 >Title</th><th align= left width= 100 >Author</th><th align= left width= 200 >Content</th>
<th align= left width= 100 >Date</th></tr>";

while($row = mysql_fetch_array($result)) {
echo "<tr><td>".$row[0]."</td>";
echo "<td>".$row[1]."</td>";
echo "<td>".$row[2]."</td>";
echo "<td>".$row[3]."</td></tr>";
}
echo "</table>";

}

?>
so the form is to check for the username and password. Once that is done- the user should be directed to another form that would invoke the php search engine script. I learnt that i could user form hidden fields to save the search strings from the first form and use them in the second but i dont know how to do that. do you?:-)
i tried the header(); function but didnt work either.
colanth- thanks for sending me to chapter 9 in my book :-)
session variables and cookies :-)
ADD:

Andrei- thanks a lot man. I tried the script just as is- i.e.

<?php
header("Location: http://www.mysite.com/search.html");
?>

and it worked fine. I have reworked the script and posted it here:

http://answers.yahoo.com/question/index?qid=20080609211412AARmFGM&pa=FYd1D2bwHTHzJblmE.s5RIk7H9sQEq1B.0Yu0Nu2jDrS_g--&paid=asked&msgr_status=

i would appreciate if you could look at it and let me know what you think is the problem. It just doesnt work. I think i prefer the header function to sessions and hidden fileds). Thanks a lot.
Andrei- great work- the mystery is finally solved- thanks- man.

apache vrs. 2.2.8
php vrs. 5.2.6
mysql vrs. 5.0.51b

No comments: