PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 6th, 2012, 05:12 AM
kareez kareez is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 1 kareez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 36 sec
Reputation Power: 0
PHP-General - Search form problem

Hi
I have a php search form. this form not work.
My database name is Final_db and database table name is students_info
It's html page source :
Code:
<html>
   <head>
      <title>Get Code Form</title>
	  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	  <style type="text/css">
<!--
body,td,th {
	font-family: Tahoma;
	background-color:#bdbdbd;
}
.style1 {font-size: 12px}
-->
   </style></head>
   <body>
   <h1 align="center" class="style1">Get form Code for Students in 2012</h1>
                <div align="center" style="width:100%; background:#cdcdcd; font-size: 12; direction:rtl; padding:10px 30px 10px 30px; line-height:25px; border:1px solid #fff;">
                  <p>For get your student code inter your National code and birth year .</p>
				  <form action="search.php" method="post"> 
                  <tr>
				  <td>National Code : </td>
				  <td><input type="text" name="search" /></td>
				  </tr><br/>
				  <tr>
				  <td>Birth year : </td>
				  <td><input type="text" name="Birthday" /></td>
				  <br/><br/>
                  <input name="submit" type="submit" value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"  />
				  </tr><br/>
                  </form>
                  <p>Contact me : ...</p>
                </div>
   </body>
</html>


It's PHP code:
Code:
<?php require_once('Connections/conecction.php'); ?>
<?php
$search= $_POST['search'];
$burth = $_POST['Birthday'];

$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
  $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_conecction, $conecction);
mysql_query('set names utf8');
$query_Recordset1 = "SELECT * FROM `student_info` WHERE `Melcode` = '$search' AND `Birthday` = '$burth'";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $conecction) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
  $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
  $all_Recordset1 = mysql_query($query_Recordset1);
  $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;


?>

<style type="text/css">
<!--
.style3 {font-family: Tahoma; font-size: 12px; line-height:25px; padding:0 8px 0 8px; }
ul,li {
    line-height:25px;
	text-align:right;
	direction:rtl;
}
tr,td,th {
    direction:rtl;
	font-family: Tahoma;
	font-size: 12px;
	text-align:right;
}
p {
    direction:rtl;
	font-family: Tahoma;
	font-size: 12px;
	text-align:right;
	padding-right:30px;
	color:red;
}
body {
	background-color:#bdbdbd;
	font-family: Tahoma;
	font-size: 12px;
}
a {
	font-family: Tahoma;
	font-size: 12px;
}
.result {
    background-color:#dedede;
	width:150px;
	direction:rtl;
	padding:0 10px 0 10px;
}
-->
</style>


<div class="center">
  <div align="center">
  <div align="center" dir="rtl" lang="fa">
  <div align="center" class="style3"><strong>Get code form</strong></div>
</div>
<br>
<table border="0" align="center" dir="rtl">
<tr>
    <td width="130px" align="right"  bgcolor="#cdcdcd"><span class="style3">Name</span></td>
    <td width="130px" align="right" bgcolor="#cdcdcd"><span class="style3">Family</span></td>
    <td width="130px" align="right" bgcolor="#cdcdcd"><span class="style3">Father</span></td>
    <td width="130px" align="right" bgcolor="#cdcdcd"><span class="style3">Birth Year</span></td>
    <td width="130px" align="right" bgcolor="#cdcdcd" ><span class="style3">Id Num</span></td>
    <td width="130px" align="right" bgcolor="#cdcdcd" ><span class="style3">National Code</span></td>
    <td width="130px" align="right" bgcolor="#cdcdcd" ><span class="style3">Mobile</span></td>
</tr>
  <?php do { ?>
  <tr>
    <td  class="result"><span><?php echo $row_Recordset1['Name']; ?></span></td>
    <td  class="result"><span><?php echo $row_Recordset1['Family']; ?></span></td>
	<td  class="result"><span><?php echo $row_Recordset1['Father']; ?></span></td>
	<td  class="result"><span><?php echo $row_Recordset1['Birthday']; ?></span></div></td>
	<td  class="result"><span><?php echo $row_Recordset1['Shnum']; ?></span></div></td>
	<td  class="result"><span><?php echo $row_Recordset1['Melcode']; ?></span></div></td>
	<td  class="result"><span><?php echo $row_Recordset1['Mobile']; ?></span></div></td>
  </tr>
  <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
  <div align="center" ><strong>
    <tr>
    <td>
	  <p>Note :
	    <ul>
		   <li>After inter to your accont, change your password.</li>
		</ul>
	  </p>
	</td>
  </tr>
</strong></div>
  </div>
</div>


And it's error:
Code:
Warning: require_once(Connections/conecction.php): failed to open stream: No such file or directory in C:\old_xampp\htdocs\search.php on line 1

Fatal error: require_once(): Failed opening required 'Connections/conecction.php' (include_path='.;C:\old_xampp\php\PEAR') in C:\old_xampp\htdocs\search.php on line 1

Please help me.


Reply With Quote
  #2  
Old December 6th, 2012, 06:35 AM
Jacques1's Avatar
Jacques1 Jacques1 is offline
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,855 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 16 h 1 m 2 sec
Reputation Power: 813
Hi,

please read the error message and think for yourself: Is the script you want to include really called "conecction.php"? I doubt that.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - Search form problem

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap