Mit Chauhan
New member
JAI MATADI all ..
m using php with mysql database in which m fetching data from my database to my table in my webpage ..
but what i want is the table must add only 5 or 6 something values per page .. if the search results are more then that it will be automatically add the pages calls PAGE2 something .. how can i do this .. here is my code for your kind information ..
-----------------------------------
<form method="post" name="form1">
Select Gender :
<input type="radio" name="g1" value="Male" checked="checked" />Male
<input type="radio" name="g1" value="Female" />Female
<br />
Marital Status :
<select name="marital">
<option value="Single">Single</option>
<option value="Divorcee">Divorcee</option>
<option value="Widow">Widow</option>
</select>
<input type="submit" name="submit" value="Search" />
</form>
<?php
if (isset($_POST["submit"]))
{
//echo "hello";
$gender = $_POST["g1"];
$marital = $_POST["marital"];
mysql_connect("localhost","root","");
mysql_select_db("alldatabase");
$qry = "select * from signup where pgender='$gender' and pmaritalstatus='$marital'";
$rs = mysql_query($qry);
if(!mysql_query($qry))
{
echo mysql_error();
}
while($rows = mysql_fetch_array($rs))
{
//echo "value fetching";
$imgg = $rows["ppassportphoto"];
$fullname = $rows["pname"];
//echo $fullname;
$marital = $rows["pmaritalstatus"];
echo "<table border='1' rules='cols'>";
echo "<tr>";
echo "<td rowspan='4' >";
echo "<img src='$imgg' alt='image' class='imagee' height='203' width='167'
>";
echo "</td>";
echo "<td width='300'>";
echo "$fullname";
echo "<hr>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td >";
echo "$marital";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td >";
echo "$marital";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td >";
echo "$marital";
echo "</td>";
echo "</tr>";
echo "</table>";
}
}
?>
----------------------------------
dont go much about that MARITAL in my TD its example only .. i want to add page numbers automatically according to the results ..
please help the php experts if you can ..
thank you ..
m using php with mysql database in which m fetching data from my database to my table in my webpage ..
but what i want is the table must add only 5 or 6 something values per page .. if the search results are more then that it will be automatically add the pages calls PAGE2 something .. how can i do this .. here is my code for your kind information ..
-----------------------------------
<form method="post" name="form1">
Select Gender :
<input type="radio" name="g1" value="Male" checked="checked" />Male
<input type="radio" name="g1" value="Female" />Female
<br />
Marital Status :
<select name="marital">
<option value="Single">Single</option>
<option value="Divorcee">Divorcee</option>
<option value="Widow">Widow</option>
</select>
<input type="submit" name="submit" value="Search" />
</form>
<?php
if (isset($_POST["submit"]))
{
//echo "hello";
$gender = $_POST["g1"];
$marital = $_POST["marital"];
mysql_connect("localhost","root","");
mysql_select_db("alldatabase");
$qry = "select * from signup where pgender='$gender' and pmaritalstatus='$marital'";
$rs = mysql_query($qry);
if(!mysql_query($qry))
{
echo mysql_error();
}
while($rows = mysql_fetch_array($rs))
{
//echo "value fetching";
$imgg = $rows["ppassportphoto"];
$fullname = $rows["pname"];
//echo $fullname;
$marital = $rows["pmaritalstatus"];
echo "<table border='1' rules='cols'>";
echo "<tr>";
echo "<td rowspan='4' >";
echo "<img src='$imgg' alt='image' class='imagee' height='203' width='167'
>";
echo "</td>";
echo "<td width='300'>";
echo "$fullname";
echo "<hr>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td >";
echo "$marital";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td >";
echo "$marital";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td >";
echo "$marital";
echo "</td>";
echo "</tr>";
echo "</table>";
}
}
?>
----------------------------------
dont go much about that MARITAL in my TD its example only .. i want to add page numbers automatically according to the results ..
please help the php experts if you can ..
thank you ..