when ever the user logged in the database table the current
registered date will be appeared
Answers were Sorted based on User's Feedback
Answer / master
if you want to store the current date from the database
then use current_date() to get the current date and insert
into the table or if you want to take the value from php
and store it in the database the use date('d/m/y') and
insert using the insert query into the db.
Is This Answer Correct ? | 3 Yes | 0 No |
Is it possible to protect special characters in a query string?
Tell me how can we connect to a mysql database from a php script?
How to initiate a session in php?
Explain me what is the use of 'print' in php?
What are escaping characters? Explain with an example?
What is asort php?
display selected value in dropdown list through javascript without page refresh
How do I update php?
Give the case where we can use get and we can use post methods?
What beforeFilter() is used?
What does $_server mean?
<?php include ("db.php"); $result = mysql_query("SELECT ques_id FROM questionbank order by ques_id limit 5 "); while($obj=mysql_fetch_array($result)) { $ad1[$obj['ques_id']]++;//Used an array and inserted the database query results into it. } $rand_keys=array_rand($ad1,1); //Did a random array function echo "First random id = ".$ad1[$rand_keys[0]]; echo "<br>Second random id = ".$ad1[$rand_keys[1]]; ?> <!--Its not working. Have any solution for this. -->