Jump to content

localhost1

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Everything posted by localhost1

  1. the variable u r assigning in first page n second are same so change code of second page to this session_start(); $v=$_SESSION['$uid']; echo("$v");
  2. try without sending headers in the mail function
  3. pls write the function inside the class so that more ideas could be explred
  4. i think u have to define the form with enctype attribute like this <form id="frm" name="frm" method="post" action="new.php" enctype="multipart/form-data">
  5. i think u have to check the directroy where u have stored the session variables
  6. great! thank you very much
  7. yes i have tried this one. both the date is in following format $month=$_REQUEST['mon']; $year=$_REQUEST['yr']; $date=date("d"); the date is in the same format. actually i want to try this code in calender. the above comparison is working in the present month in the calender. but when i click in next month button of the calender then the above comparison is not working.
  8. hi! i have requested the selected date from another page and the current date is taken from session. now i want to check one condition that if the selected date is greater than the todays date then open a form else do not open. but the date comparison code is not working. here is my code $user_sel_date=$_REQUEST['myseldate']; $mycurrentdate=$_SESSION['mycurrdate']; if ($user_sel_date >= $mycurrentdate) { echo "inside the if"; } else echo "outside the if";
  9. hi everyone i have a problem in my php pages in IE7. the problem is that when i open the pages or click in any link to open the pages then the page loads completely but the flag at the top right corner is still running for very long time. But this is not the problem in FireFox. what could be the reason pls write me. thanks
  10. hi thanks for reply but will u please give me an example how timestamp variables are compared?? thanks
  11. hi thanks for your reply in the code given below time inserted in the database field is integer and it compares new inserting value as integer. but what i want to do is insert time in database in the format 2:30 and date as 08-09-2007.But at my present code the time is inserted as 230 not 2:30 n the same thing i want to do with date. i want to compare newly inserting date and time with the existing values in the database n insert if they are not present in the database. so pls give me the idea how can i do this . the code goes like this if(isset($_REQUEST['timesubmit'])) { $fromhr=$_REQUEST['from']; $tohr=$_REQUEST['to']; $frommin=$_REQUEST['fromtime']; $tomin=$_REQUEST['totime']; $from=$fromhr.$frommin; $to=$tohr.$tomin; //echo $from; $day=date("d"); $month=date("m"); $year=date("Y"); $array = array($day,$month,$year); $date = implode("-", $array); if(($from <$to)) { $que1= "SELECT * FROM voyance_user_reservation WHERE (user_reserve_time_end > $from AND user_reserve_time_start < $to)"; //echo $que1; $result1 = mysql_query($que1); if (mysql_num_rows($result1)!=0) { $var1=true; $app->error_display_type=2; $app->error("This record overlaps existing time slots"); } else { $var2=true; $que2="insert into voyance_user_reservation values('','".$from."','".$to."','".$date."','','')"; $result2=mysql_query($que2); $app->error_display_type=2; $app->error("Time Reserved Successfuly"); } } else { $var3=true; $app->error_display_type=2; $app->error("Start Time Cannot Be Greater Than Or Equal To The End Time"); } } code in html goes like this <select name="from"> <? for($i=1;$i<=24;$i++){?> <option value="<?=$i;?>"><? echo $i;?></option> <? }?> </select> </td> <td><select name="fromtime"> <option value="10">10</option> <option value="20">20</option> <option value="30">30</option> <option value="40">40</option> <option value="50">50</option> </select> thank u very much
  12. hi i have a condition to test the value of date and time greater than or lessthan the value of date and time in two separate field and indsert or reject insert value in mysql. can i do this by defining the field property as tmestamp or any other. will you please help me with example??
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.