i am having a little problem with how i can have a page similar to the images below, i am still a noob in php and sql , so please help me out
database search and show in website?
Moderator: General Moderators
database search and show in website?
hello everyone
i am having a little problem with how i can have a page similar to the images below, i am still a noob in php and sql , so please help me out
i am having a little problem with how i can have a page similar to the images below, i am still a noob in php and sql , so please help me out
Last edited by bd_safa on Sat Jan 10, 2009 6:56 am, edited 1 time in total.
Re: database search and show in website?
what do you mean by similar page? you mean those two output should be located in a single PHP file and using PHP to decide which one to display?
Re: database search and show in website?
no, you give the refrence number and password in image 1, and php returns the info about the entery in image number 2, thats what i meanit2051229 wrote:what do you mean by similar page? you mean those two output should be located in a single PHP file and using PHP to decide which one to display?
Re: database search and show in website?
great, have you started coding it?
Re: database search and show in website?
well , since i am not good at sql, so i don't know where to start from!?it2051229 wrote:great, have you started coding it?
Re: database search and show in website?
this is not a tutorial website.. you start coding and when you have stuff that you dont understand or can't get it working then this is where we come in. There are a lot of free PHP Mysql Books you can download from the internet.
Re: database search and show in website?
well , then let me finish the coding then i will let you know about it.it2051229 wrote:this is not a tutorial website.. you start coding and when you have stuff that you dont understand or can't get it working then this is where we come in. There are a lot of free PHP Mysql Books you can download from the internet.
Re: database search and show in website?
Cheers, I finished the coding and it works well, if you want the codes , just let me know. 
Re: database search and show in website?
just make sure its worth looking at it.
Re: database search and show in website?
here we go :
<style type="text/css">
<!--
body {
margin-left: 30px;
}
-->
</style><?
$refr_field = $_POST['refr'];
$pass_field = $_POST['pass'];
$user="user";
$password="pass";
$database="database";
mysql_connect(localhost,$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM status WHERE ref=$refr_field";
$result=mysql_query($query);
echo "<b><center>Onine Paper Status Report</center></b><br><br>";
if (mysql_num_rows($result)==0){
echo "The refrence number or password is incorrect or the paper is removed, please contact the office for more information";
exit;
}
while ($row=mysql_fetch_assoc($result)){
if ($pass_field==$row["pass"]){
echo "<b>Refrence Number:</b><br>";
echo $row["ref"];
echo "<br><b>Paper Title:</b><br>";
echo $row["title"];
echo "<br><b>Authors:</b><br>";
echo $row["auth"];
echo "<br><b>Correspondens:</b><br>";
echo $row["cor"];
echo "<br><b>Paper Status:</b><br>";
echo $row["stat"];
echo "<br><b>Message from editor:</b><br>";
echo $row["msg"];
} else {
echo "The refrence number or password is incorrect or the paper is removed, please contact the office for more information";
}
}
mysql_free_result($result);
?>
Re: database search and show in website?
ok you wasted my time, it's not worth looking at. oh and good start.