Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Generic User Avatar

help w/redirect


  • Please log in to reply
1 reply to this topic

#1 guitarzRus

guitarzRus

  •  Avatar image
  • Members
  • 30 posts
  • OFFLINE
  •  
  • Local time:01:44 PM

Posted 06 August 2021 - 10:13 PM

<?php
$link = mysqli_connect("localhost", "root", "", "prerentdb");
// Check connection
if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); }

$id='id';
echo "<center>";echo date('m/d/y');echo "<br />";

// Attempt select query execution
$result = mysqli_query($link,"SELECT * FROM numbers");
$row= mysqli_fetch_array($result);

$id='id';
$expiry='expiry';
if ($_POST["expiry"] === $_POST["confirm_password"]) {

$sql = "UPDATE numbers SET expiry = $expiry-1 where id=$id  ";
if(mysqli_query($link, $sql)){ echo "expiry was updated successfully."; }
else { echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); }

if ($expiry == 0) // go to expiredpage.html
 {
header("location:expiredpage.html");
 }

else  // go to sysnav.html
  {
header("location:sysnav.html");
 }
// Close connection
mysqli_close($link);
?>


Edited by hamluis, 08 August 2021 - 07:30 PM.
Merged topics - Hamluis.


BC AdBot (Login to Remove)

 


#2 guitarzRus

guitarzRus
  • Topic Starter

  •  Avatar image
  • Members
  • 30 posts
  • OFFLINE
  •  
  • Local time:01:44 PM

Posted 08 August 2021 - 07:05 PM

 

I want to change a duedate up to a month later. I think the below code is what I want if I change it
correctly:
$startDate = '2021-06-03'; // do I leavee as is? Is the date shown just to show format?
$nMonths = 1; // move ahead one month
$final = endCycle($startDate, $nMonths); // I changed "$final" to "$duedate"? this is line 41
I got:
Fatal error: Uncaught Error: Call to undefined function endCycle() :41 Stack trace: #0 {main} thrown


 

 






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users