473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

problum wth sql and script php ( get data from cureent date in php)

Expand|Select|Wrap|Line Numbers
  1. <link rel="stylesheet" type="text/css" href="tcal.css" />
  2.  <script type="text/javascript" src="tcal.js"></script>
  3.  <form action="11.php" method="get">
  4. Date : <input type="text" name="date" class="tcal" value="" />
  5. <input type="submit" value="Search">
  6. </form>
  7. <table id="resultTable" data-responsive="table" style="text-align: left; width: 400px;" border="1" cellspacing="0" cellpadding="4">
  8. <thead>
  9.     <tr>
  10.     <th> Name </th>
  11.     <th> Gender </th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. <?php
  16. include('connect.php');
  17. if (isset($_GET["date"])) { $date = $_GET["date"]; } else { $date=0; }; 
  18. $result = $db->prepare("SELECT * FROM birthday WHERE date  :a");
  19. $result->bindParam(':a', $date);
  20. $result->execute();
  21. for($i=0; $row = $result->fetch(); $i++){
  22. ?>
  23. <tr class="record">
  24. <td><?php echo $row['name']; ?></td>
  25. <td><?php echo $row['gender']; ?></td>
  26. </tr>
  27. <?php
  28. }
  29. ?>
  30. </tbody>
  31. </table>

when i select the any date then i get all dates data values from mysql database. so i want to set this example if i select any one date then i get data of selected date only not all. for understanding my concept you can visit here http://joomusic.info/joosilver.php here you can see the box where i select the date and i get the data. i want same this thing.
Mar 13 '14 #1
1 1386
Dormilich
8,658 Expert Mod 8TB
you’re missing an equal sign in your SQL.
Mar 14 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Limey | last post by:
We are working with a vendor who is trying to post some some XML data to us. They are using an ASPX script to post to a PHP page of ours. The problem is that in the PHP page, I cannot find any...
2
by: ed kool | last post by:
Question how to code "multipart/form-data” in a PHP script ? We are trying to make our program trchat.exe work via the following PHP script: <?php $lang = " English to Dutch"; ...
9
sanjay123456
by: sanjay123456 | last post by:
dear friends I want to convert a java script variable in to php varible some code i write its not work <form name="myform" method="post" action="abc.php"> <input type="button"...
3
by: one.1more | last post by:
How do i post the form data to different php files at once. I tried the following code but it doesn't work. the data is sent only to the first php file. <form method="post" action="insert.php"...
9
by: shara | last post by:
Hello there, I've a script that uses sql,php and html.I need this script to call another script.The script generates check boxes for the users to select, before the button is clicked.But after the...
0
by: Sebarry | last post by:
Hi, I have the following actionscript that invokes a PHP script. var articlesToRetrieve = 5; var currentIndex = 0; varSenderTitles = new LoadVars();
3
by: leonardodiserpierodavinci | last post by:
Hi. Sorry for what is perhaps a neophyte question: is it possible to pass a variable to a PHP script from inside another PHP piece of code? For instance, the file test.php (which of course...
3
by: Jasmin Guila | last post by:
good day! Im a newbie in PHP and i really need your help this is my problem actually there's no error in my code when i run it, but when i press save the data does not save to the database. please...
2
by: jayanta21 | last post by:
Hi, I have got a problem in jsp to search data by date from database which is in postgresql.what happen i have a field in database "date",now i am trying to search data in jsp page between two...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.