PHP - Ignore This! Solved
EDIT:
I solved it! Similar TutorialsI'm having problems everything is working fine I have an Include code for php and I put a <div> code in it working with css. It comes up on the page just fine the problem is a strange text that shows up on the page, There was other strange text that it was printing out on the page that I deleted but these two character I can't seem to find where they are in the code looked in the html file, css file and php file: }} maybe it's coming from the css file but I don't know. It shows up on the webpage and kind of is in the way of perfection on the leveling of the page. Anyone have this problem? What should I do? Should I move around the include code in the <body> I just don't know could you help me? I'm sure this is just a stupid mistake, but can someone please help me figure it out? I have one page with a dropdown that is populated from our database, I have submit to pull through to the next page but nothing shows up on the next page (app/approval). I've tried adding some echo statments, but they all show up blank. Code: [Select] <? require ('includes/getconfig.inc'); require ('includes/auth.inc'); require ('includes/dbfunctions.inc'); include (dirname(__FILE__).'/../includes/menuhead.inc'); include ('apptable_functions.inc'); $sql="SELECT pol_id, pol_policy_number FROM policies"; $result=myload($sql); $items = count($result); $options=""; for($x=0; $x<=$items; $x++) { $id=$result[$x]['pol_id']; $thing=$result[$x]['pol_policy_number']; $options.="<OPTION VALUE=\"$id\">".$thing; } ?> Select a case number to see the payout approval. <br> <form action="app/approval.php" method='post'> <SELECT NAME=pol_policy_number> <?=$options?> </SELECT> <input name="Submit" type="submit" Value="Submit Policy Number"/> </form> <br> Code: [Select] <? require ('includes/getconfig.inc'); require ('includes/auth.inc'); require ('includes/dbfunctions.inc'); $pol_number = $_POST['pol_policy_number']; echo "$pol_number"; ?> [Edit: Sorry I found my answer by searching for "period", then finding out that it is a string operator, then read about that. Doesn't seem easy to search for ".=" in Google. Thanks] I got some help here earlier, and I can pretty much understand everything, except I don't understand why there is Code: [Select] $recordOptions .= "<option value=\"{$row['id']}\">"; $recordOptions .= " {$row['firstname']} {$row['lastname']}, {$row['gender']}, {$row['dob']}"; $recordOptions .= "</option>\n"; Why does this whole thing break without .= ? I am new to PHP so, sorry if the answer is really obvious. Code: [Select] $recordOptions = ''; $query = "SELECT * FROM people"; $result = mysql_query($query); if(!$result) { $recordOptions = "<option>Error Retrieving Records</option>\n";; } else { while($row=mysql_fetch_assoc($result)) { $recordOptions .= "<option value=\"{$row['id']}\">"; $recordOptions .= " {$row['firstname']} {$row['lastname']}, {$row['gender']}, {$row['dob']}"; $recordOptions .= "</option>\n"; } } ?> <html> <body> <?php echo $confirmMsg; ?><br /> <form action ='' method='post'> I put a snippet up yesterday, and thought it had been solved. It had a typo error, but there is still something wrong. The whole page follows, because it might be easier to see what I am doing. The form successfully inserts a new record OK, but it will not update a record that already exists as is intended. Instead, it always creates another new record. Where can I be wrong? <?php session_start(); // See if logged in member by checking session data if (isset($_SESSION['recid'])) { // Put stored session variables into local php variable $userid = $_SESSION['recid']; $username = $_SESSION['name']; $school = $_SESSION['college']; $payer_email = $_SESSION['payer_email']; $group1 = $_SESSION['group1']; $group2 = $_SESSION['group2']; $group3 = $_SESSION['group3']; $group4 = $_SESSION['group4']; $group5 = $_SESSION['group5']; $group6 = $_SESSION['group6']; } else { ?> <!-- make login box --> <html> <tr> <td> <p> <p> <p></td> </tr> <table style= border align="center" border="1" width="400" height="200"> <td align="center" valign="center">You need to<a href="login_allocate_quiz.php">log in</a>as an administrator to<br /> allocate quizzes to student groups.</td> </table> </html> <?php exit(); } // Set error message as blank upon arrival to page $errorMsg = ""; // Check to see if the form has been submitted if (isset($_POST['equip'])){ //Connect to the database through include include_once "demo_conn.php"; //set variables $equip = $_POST['equip']; $egroup1 = $_POST['egroup1']; $egroup2 = $_POST['egroup2']; $egroup3 = $_POST['egroup3']; $egroup4 = $_POST['egroup4']; $egroup5 = $_POST['egroup5']; $egroup6 = $_POST['egroup6']; //create variables to manipulate filenames in database $lowquip = strtolower($equip); $wordquip = str_replace (" ", "", $lowquip); $bigpic = $wordquip.'big'; $smallpic = $wordquip.'small'; $bigpic = $bigpic.'.jpg'; $smallpic = $smallpic.'.jpg'; $errorMsg = '<font size="-1"><u>ERROR:</u> You have not entered the following required information.'; $nogroup = ((!$egroup1) && (!$egroup2) && (!$egroup3) && (!$egroup4) && (!$egroup5) && (!$egroup6)); $noequip = (!$equip); if ($nogroup) {$errorMsg .= "--- Student Group. (No data was forwarded to the database.)</font>";} else if($noequip) {$errorMsg .= "--- Quiz Name. (No data was forwarded to the database.)</font>";} else {$query = mysql_query("SELECT equip FROM topics WHERE equip = '$equip' AND managerId = '$userid'"); if (mysql_num_rows($query) > 0) mysql_query("UPDATE topics SET egroup1 = '$egroup1', egroup2 = '$egroup2', egroup3 = '$egroup3', egroup4 = '$egroup4', egroup5 = '$egroup5', egroup6 = '$egroup6' WHERE equip = '$equip' AND managerId = '$userid'"); else mysql_query("INSERT INTO topics (managerId, equip, title, url_big, url_small, egroup1, egroup2, egroup3, egroup4, egroup5, egroup6) VALUES ('$userid','$wordquip', '$equip', '$bigpic', '$smallpic', '$egroup1', '$egroup2', '$egroup3', '$egroup4', '$egroup5', '$egroup6')") or die (mysql_error("error 1321")); $URL='make_quiz_list_test4.php'; header ('Location: '.$URL); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="X-UA-Compatible" content="IE=4"> <!-- IE5 mode --> <meta http-equiv="X-UA-Compatible" content="IE=7.5"> <!-- IE7 mode --> <meta http-equiv="X-UA-Compatible" content="IE=100"> <!-- IE8 mode --> <meta http-equiv="X-UA-Compatible" content="IE=a"> <!-- IE5 mode --> <title>Manager selected quiz list</title> <link rel="stylesheet" href="style.css" type="text/css" media="screen" /> <!--[if IE 6]><link rel="stylesheet" href="style.ie6.css" type="text/css" media="screen" /><![endif]--> <!--[if IE 7]><link rel="stylesheet" href="style.ie7.css" type="text/css" media="screen" /><![endif]--> <script type="text/javascript" src="script.js"></script> </head> <body> <div id="art-page-background-simple-gradient"> <div id="art-page-background-gradient"></div> </div> <div id="art-main"> <div class="art-sheet"> <div class="art-sheet-tl"></div> <div class="art-sheet-tr"></div> <div class="art-sheet-bl"></div> <div class="art-sheet-br"></div> <div class="art-sheet-tc"></div> <div class="art-sheet-bc"></div> <div class="art-sheet-cl"></div> <div class="art-sheet-cr"></div> <div class="art-sheet-cc"></div> <div class="art-sheet-body"> <div class="art-header"> <div class="art-header-png"></div> <div class="art-header-jpeg"></div> <div class="art-logo"> <h1 id="name-text" class="art-logo-name"><a href="#">Safety Testing Online</a></h1> <div id="slogan-text" class="art-logo-text">Safety - The Most Valuable Insurance</div> </div> </div> <div class="art-nav"> <div class="l"></div> <div class="r"></div> <div class="art-nav-center"> <ul class="art-menu"> <li> <a href="../../index.php" class="active"><span class="l"></span><span class="r"></span><span class="t">Home</span></a> </li> <li> <a href="../demo_main.php"><span class="l"></span><span class="r"></span><span class="t">Demonstrations Page</span></a> <ul> </ul> </li> <li> <a href="logout.php"><span class="l"></span><span class="r"></span><span class="t">Admin Logout</span></a> </li> </ul> </div> </div> <div class="art-content-layout"> <div class="art-content-layout-row"> <div class="art-layout-cell art-content"> <div class="art-post"> <div class="art-post-tl"></div> <div class="art-post-tr"></div> <div class="art-post-bl"></div> <div class="art-post-br"></div> <div class="art-post-tc"></div> <div class="art-post-bc"></div> <div class="art-post-cl"></div> <div class="art-post-cr"></div> <div class="art-post-cc"></div> <div class="art-post-body"></div> <div class="art-post-bl"></div> <div class="art-post-br"></div> <div class="art-post-tc"></div> <div class="art-post-bc"></div> <div class="art-post-cl"></div> <div class="art-post-cr"></div> <div class="art-post-cc"></div> <div class="art-post-body"> <div class="art-post-inner art-article"> <table style="table-layout:fixed; width:850px;"> <tr> <td style="text-align:left; width:30px;"> </td> <td style="text-align:left; width:350px;"><font size="+1">Allocation of Woodwork Quizzes to Groups.</font></td> <td style="text-align:left; text-align:center; vertical-align:bottom; width:450px;"><font color="#0000FF">Administrator: <?php echo $username; ?> - <?php echo $school; ?>.</font></td> <td style="text-align:left; width:20px;"></td> </tr> </table> <table style="table-layout:fixed; width:850px;"> <tr> <td style="text-align:left; width:30px;"></td> <td style="text-align:left; vertical-align:bottom; width:800px;"><font color="#FF0000"><?php echo "$errorMsg"; ?></font></td> <td style="text-align:left; width:20px;"></td> </tr> </table> <table style="table-layout:fixed; border:thin; text-align:left; width:850px;"> <tr> <td style="text-align:right; width:35px;"></td> <td style="text-align:left; width:190px;"></td> <td style="text-align:right; width:20px;"></td> <td style="text-align:left; width:210px;"><font color="#FF0000"></font></td> <td style="text-align:right; width:20px;"></td> <td style="text-align:left; width:110px;"></td> <td style="text-align:right; width:20px;"></td> <td style="text-align:right; width:180px;"></td> <td style="text-align:right; width:35px;"></td> </tr> <hr/> <tr> <td rowspan="12"></td> <td rowspan="12"> <br/> <form method="post" enctype="multipart/form-data" action="make_quiz_list_test4.php"> <!--<form method="post" action="< ?php echo $PHP_SELF;?>">--> <select size="25" name="equip" /> <option selected value="">No Quiz Selected</option> <option value="Biscuit Jointer">Biscuit Jointer</option> <option value="Dowelling Machine">Dowelling Machine</option> <option value="Drill Cordless">Drill - Cordless</option> <option value="Drill with Cord">Drill - Power Corded</option> <option value="Pedestal Drill">Drill - Pedestal</option> <option value="Edge Tool Sharpener">Edge Tool Sharpener</option> <option value="General Workshop Safety">General Workshop Safety</option> <option value="Pedestal Grinder">Grinder - Pedestal</option> <option value="Hand Tools">Hand Tools</option> <option value="Jointer">Jointer (fixed)</option> <option value="Jointer Surfacer Combo">Jointer/Surfacer (combo)</option> <option value="Shaper">Shaper (fixed)</option> <option value="Lathe for Wood">Lathe - Wood</option> <option value="Linisher">Linisher</option> <option value="Mortiser with Hollow Chisel">Mortiser - Hollow Chisel</option> <option value="Nailgun for Brads">Nailer - Air (brads)</option> <option value="Planer Portable">Planer - (portable)</option> <option value="Router Portable">Router - Plunge</option> <option value="Router with Sliding Table">Router Table - Slide</option> <option value="Sander Belt">Sander - Belt (fixed)</option> <option value="Sander Disc Belt Combo">Sander - Belt/Disc Combo)</option> <option value="Sander Portable Belt">Sander - Belt (portable)</option> <option value="Sander Disc">Sander - Disc (fixed)</option> <option value="Sander Orbital">Sander - Orbital</option> <option value="Sander Random Orbit">Sander - Random Orbital</option> <option value="Sander Bobbin">Sander - Vertical Spindle</option> <option value="Saw Bandsaw">Saw - Bandsaw</option> <option value="Saw Bench">Saw - Circular (bench)</option> <option value="Saw Portable Circular">Saw - Circular (portable)</option> <option value="Saw Drop or Chop">Saw - Drop (alt Chop)</option> <option value="Saw Drop and Slide">Saw - Drop & Slide</option> <option value="Jigsaw Portable">Saw - Jigsaw (portable)</option> <option value="Saw Panel">Saw - Panel (fixed)</option> <option value="Saw Radial Arm">Saw - Radial Arm</option> <option value="Saw Sabre">Saw - Sabre(portable)</option> <option value="Saw Scroll">Saw - Scroll</option> <option value="Screw Driver Portable">Screwdriver - Portable</option> <option value="Thicknesser">Thickness Planer</option> </td> <td> </td> <td> </td> <td> </td> <td rowspan="7"><br /> <br /> <br /> <input type="checkbox" name="egroup1" value="1" /> <?php echo $group1; ?> <p> <input type="checkbox" name="egroup2" value="1" /> <?php echo $group2; ?> <p> <input type="checkbox" name="egroup3" value="1" /> <?php echo $group3; ?> <p> <input type="checkbox" name="egroup4" value="1" /> <?php echo $group4; ?> <p> <input type="checkbox" name="egroup5" value="1" /> <?php echo $group5; ?> <p> <input type="checkbox" name="egroup6" value="1" /> <?php echo $group6; ?> <p> <input type="submit" value="submit" name="Send Data"> </form> </td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td style="border:solid; color:#006600; 1px; padding:10px; text-align:left;"><font size="-1">Select a Quiz Topic from the drop down list on the left. Then go to the check boxes on the right to select all of the groups that are expected to undertake this test. <p>You can select only one quiz each time, but you can select from one to six groups to undertake that quiz. <p>Repeat this process until you have allocated all of the tests that you require each group to complete. <p>If you make a mistake you can delete a quiz allocation <a href="../../under_con.php">here</a> at any time. </font></td> <td></td> <td></td> <td style="color:#006600;"><font size="-1">Go back to the <br /> <a href="member_account.php">main edit page</a>.<br/> <br /> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> </font></td> </tr> <tr> <td></td> <td> <br/> <br/> <br/> <br/></td> <td></td> <td></td> <td></td> </tr> </table> <!-- /article-content --> </div> <div class="cleared"></div> </div> <div class="cleared"></div> </div> </div> </div> </div> </div> <div class="cleared"></div> <div class="art-footer"> <div class="art-footer-inner"> <div class="art-footer-text"> <p><a href="#">Contact Us</a> | <a href="#">Terms of Use</a> | <a href="#">Trademarks</a> | <a href="#">Privacy Statement</a><br /> <?php $time = time () ; //This line gets the current time off the server $year= date("Y",$time); //This line formats it to display just the year echo "Copyright © 2010 - " . $year; //this line prints out the copyright date range, you need to edit 2010 to be your opening year ?> All Rights Reserved.</p> </div> </div> <div class="art-footer-background"></div> </div> <div class="cleared"></div> </div> </div> <div class="cleared"></div> <p class="art-page-footer">Designed by Frank.</p> </div> </body> </html> SOLVED: I'm having trouble with an SQL query via php in building my Viewthread.php file So on the main page you have a list of the Threads and the link I created is like the below <h2><a href='viewthread.php?id='{$row['id']}'> {$row['Title']} </a></h2> Post {$row['id']}<br> If I set the query to an ID that exists the page loads fine $query = mysqli_query($conn, "SELECT * FROM Threads where id='156'") however if I set the id to the GET command the page doesn't load (which should've got the id) $query = mysqli_query($conn, "SELECT * FROM Threads where id=$_GET['id']") I tried casting this to a variable first too $Number = "$_GET['id']" $query = mysqli_query($conn, "SELECT * FROM Threads where id='$Number'") Edited April 2 by Fishcakes I searched the forums and the Internet as a whole looking for more information on this, but all I've turned up is a lot of information on /how/ to use create_function(), not /when/ to use it. For instance: http://en.wikipedia.org/wiki/Lambda_calculus Let me reiterate that I understand how it works in general. However, in several years of PHP programming, even through the development of fairly complex, robust systems, I can only think of one case where I recall creating a dynamic function and even here I feel like it was a design mistake. Of course, I use anonymous functions all the time in JavaScript for callback code. It seems to be used from time-to-time to iterate over and apply transformations to sets, but I don't understand the advantage over foreach() for such a task. So, if someone is so-inclined, would you mind listing a general scenario or two where create_function() is the correct and appropriate solution to the problem? Hi all, I have a simple html form, when the values are posted to the php page I want to be able to bring up particular products based on specific details. However if the user does not enter a value, I want the script below to ignore that particular field and show all the results not taking in to consideration that field. Hope you understand. I was thinking maybe I could use something like if $_POST == "" IGNORE!! but I can not find an example on the internet. The script I have made so far is below. <?php $sql = "SELECT * FROM sales WHERE category='$_POST[category]' AND manufacturer='$_POST[manufacturer]' AND model='$_POST[model]' AND purchasetype='$_POST[type]'"; // IF VALUE OF SAY MODEL IS LEFT BLANK - I WANT THE PHP TO INGORE THE TYPE OF MODEL AND SHOW THE RESULTS JUST INCLUDING THE OTHER FIELDS. $result = mysqli_query($cxn,$sql) or die ("Couldn't execute query"); $num = mysqli_num_rows($result); if ($num >0) // Login Name found { while($row = mysqli_fetch_assoc($result)) { ?> How can I ignore - when doing claculations? e.g. 150 - 50 = 100 150 - 225 = -75 // I WANT to display only 75 and ignore the - sign I have the following Query: Code: [Select] $query = "INSERT INTO characters SET psalt = '" .$salt. "'"; However, when the salt is generated, it may contain a ', thus stopping the Query. I need to know how I could make it so the Query would be unaffected by the ' in the salt value. Thanks! i have a script that calls for a field, but if you arent on a blackberry it asks you to select a name first, so it gives error until you select: Notice: Undefined variable: posteid in E:\Website\citycore\2\mobile\schedule.php on line 20 i could make it so it didnt call for $posteid until after the name is selected, but then it wont work from the blackberry as it detects the pin number first. im trying to insert $myusername into a table only if $myusername does not exist is best to call the insert ignore or is there better way of doing this? also trying to make a list of logged in users which is allways updating when the page is auto refreshed whats the best to go about checking if the users is still there. I have a pspell script and I want it to ignore upper case. ie at the moment if I check spelling for say christopher it returns spelling error of Christopher (upper case C) <?php $query = 'helllo'; $pspell_config = pspell_config_create("en"); pspell_config_ignore($pspell_config, 5); pspell_config_mode($pspell_config, PSPELL_FAST); pspell_config_personal($pspell_config, "/home/*/public_html/custom.pws"); pspell_config_repl($pspell_config, "/home/*/public_html/custom.repl"); $pspell_link = pspell_new_config($pspell_config); $words = preg_split ("/\s+/", $query); $ii = count($words); global $spellchecked; $spellchecked = ""; for($i=0;$i<$ii;$i++){ if (pspell_check($pspell_link, $words[$i])) { $spellchecked .= $words[$i]." "; } else { $erroneous = "yes"; $suggestions = pspell_suggest($pspell_link, $words[$i]); $spellchecked .= $suggestions[0]." "; } } if($erroneous == "yes") { $spellchecked2 = str_replace(" ", "+", $spellchecked); echo "Did you mean: <a href=GetSearchResults.php?Query=$spellchecked2&catID=&siteID=3><i>".$spellchecked."</a></i>?"; } else { echo $spellchecked . " is a valid word/phrase"; } ?> Below is some code I have that I would like to connect to databases that reside on different physical machines. The problem I can't seem to solve is how to ignore machines that are unreachable. Code: [Select] <html> <head> </head> <body> <?php $mysql_conn=new mysqli('192.168.1.67','admin','password','monkey'); $result=$mysql_conn->query("SELECT * from testtable"); echo "<table>"; echo "<th>Test Query</th>"; while ($row=$result->fetch_array(MYSQL_ASSOC)){ echo "<tr><td>"; echo $row['test1']; echo "</td></tr>"; } echo "</table>"; $mysql_conn=new mysqli('192.168.1.126','admin','','monkey1'); $result=$mysql_conn->query("SELECT * from demo"); echo "<table>"; echo "<th>Test Processor</th>"; while ($row=$result->fetch_array(MYSQL_ASSOC)){ echo "<tr><td>"; echo $row['name']; echo "</td></tr>"; } echo "</table>"; $mysql_conn=new mysqli('192.168.1.127','admin','','monkey2'); $result=$mysql_conn->query("SELECT * from demo"); echo "<table>"; echo "<th>Test Processor</th>"; while ($row=$result->fetch_array(MYSQL_ASSOC)){ echo "<tr><td>"; echo $row['processor']; echo "</td></tr>"; } echo "</table>"; ?> </body> </html> If 192.168.1.126 is offline, the webpage doesn't go any further and display 192.168.1.127's info...Appreciate any insight... Having a problem with that "insert ignore into". If it is a new record, it works, when it is a excisting record that needs to be updated, it is giving me this error: Cannot execute query: INSERT IGNORE INTO (gedcom,kennel) VALUES ("World","Avongara") What or where is it going wrong? This message is for me not enough to find the problem. $kennels = array(); if( !in_array( $kennel, $kennels ) ) array_push( $kennels, $kennel ); foreach( $kennels as $kennel ) { $query = "INSERT IGNORE INTO $kennels_table (gedcom,kennel) VALUES (\"$tree\",\"$kennel\")"; $result = @mysql_query( $query ) or die ("$admtext[cannotexecutequery]: $query"); } Thanks for helping ignore Hi I'm currently experiencing a problem with my query. I've used the `INSERT IGNORE` option in my query and it works pretty well not to add duplicates, but the problem is that if my unique field match it doesn't update any other info in the row, is there maybe another option to update a row if an existing field exists but insert new row if it doesn't exists?
my current query is as follow
$query = mysqli_query($con,"INSERT IGNORE INTO mxit (ip,time,user_agent,contact,userid,id,login,nick,location,profile) VALUES ('$ip','$post_time','$mxitua','$mxitcont','$mxituid','$mxitid','$mxitlogin','$mxitnick','$mxitloc','$mxitprof')") or die(mysqli_error($con)); I am working on a little project for my site and I am trying to get this script to ignore the index.html file and the .htaccess file in there. I just want it to display all files like .zip, .rar, .tar, .gz, .gtar, .ace, ect... echo " <td width='70%'><select id='download'>"; echo " <option value=''>None</option>"; if ($handle = opendir("./modules/Downloads/files")) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo " <option value='".$file."'>".$file."</option>"; } } closedir($handle); } echo " </td>\n"; This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=309981.0 I want half of the results to to show up with a hyperlink (if I've added the link as a field in my CSV file) and half of the results to show up with no hyperlink. The link URL's are located in field 8 of a database : [8] as seen below. Could anyone help me to figure out how to add an "if" statement perhaps? Something like "if 8 true" then display "<a href"? I did not write this php code I am only modifying it. The csv file is very very straightforward, but this PHP is beyond me. Would appreciate the help! <p><a href="<?=htmlspecialchars($r[8])?>"><?=htmlspecialchars($r[1])?></a><br /> <?=htmlspecialchars($r[2])?><br /> <?=htmlspecialchars($r[3])?><br /> <?=htmlspecialchars($r[4])?><br /> <?=htmlspecialchars($r[5])?><br /> <a href="mailto:<?=htmlspecialchars($r[7])?>"><?=htmlspecialchars($r[7])?></a> </p> hello guys
i have 2 time variables
$time1 = 22:00;
$time2 = 03:00;
my $current_time is 01:00
how can i figure that $current_time is betwean the $time1 and $time2
the
if ($current_time > $time1 && $current_time < $time2)
works if the day not change!
is any way to ignore the day change
thanks
Edited by lioslios, 09 November 2014 - 10:07 PM. |