Jump to content

wavix

New Members
  • Posts

    7
  • Joined

  • Last visited

wavix's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Is there any other way to get this? $oneTime = preg_replace('/[^0-9]/', '', $one); $twoTime = preg_replace('/[^0-9]/', '', $two); $threeTime = preg_replace('/[^0-9]/', '', $three); if($oneTime == '') { $oneTime = '1 month'; } if($oneTime == '7') { $oneTime = '7 days'; } if($oneTime == '24') { $oneTime = '24 hours'; } if($twoTime == '') { $twoTime = '1 month'; } if($twoTime == '7') { $twoTime = '7 days'; } if($twoTime == '24') { $twoTime = '24 hours'; } if($threeTime == '') { $threeTime = '1 month'; } if($threeTime == '7') { $threeTime = '7 days'; } if($threeTime == '24') { $threeTime = '24 hours'; }
  2. I forgot to change $select, sorry. AJAX code is above, included in index.php between <script></script> tags, on document ready.
  3. include('config.php'); $sql = "SELECT * FROM `today`"; $mysql = mysql_query($select); while($row = mysql_fetch_array($mysql)) { $id = $row['id']; echo $id; } I want today to be replaced with index.php $_GET var, ex.: index.php?page=yesterday to change $sql in "SELECT * FROM `yesterday`".
  4. I don't know how to do. So, I have index.php?page=yesterday, how can I send yesterday to content.php? Tried this: $.ajax({ type: 'POST', url: 'content.php', data: { page: 'yesterday' }, success: function(data) {} }); no success.
  5. Thank you. But how can I send $_GET var to content.php? It is just example code, in fact I don't have $currentPage. This is what I need.
  6. Hello. I have index.php containg a div with AJAX content via content.php. Now, I need yesterday.php and tomorrow.php, like index.php, the only difference will be a variable in content.php. Something like: if($currentPage == 'yesterday.php') { $difference = 'yesterday'; } if($currentPage == 'index.php') { $difference = 'today'; } if($currentPage == 'tomorrow.php') { $difference = 'tomorrow'; } $select = "SELECT * FROM `".$difference."`"; It is possible to obtain $currentPage that I need using a single file (index.php)? How should I do? Hope you understand. Thanks!
×
×
  • 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.