Jump to content

Ch0cu3r

Staff Alumni
  • Posts

    3,404
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by Ch0cu3r

  1. Locked Accounts have been merged
  2. You don't need to convert those, they are fine as they are. Their alternative syntax would be $result->fetch_array(); // mysqli_fetch_array($result); $result->num_rows; // mysqli_num_rows($result); See documentation http://php.net/mysqli-result.fetch-array http://php.net/mysqli-result.num-rows Ideally in your code you should stick with using either the procedural or oop mysqli interface. You shouldn't really swap between the two interfaces.
  3. You have left off the semi-colon on line 71. It should be $uid = mysqli_insert_id($this->db); // last inserted id
  4. You need the INTERVAL keyword before 6 WEEK $sqlAllData = "SELECT * FROM Bank_Data WHERE EntryDate > '" . $StartDate . "' AND EntryDate < DATE_ADD('$StartDate', INTERVAL 6 WEEK) ORDER BY EntryDate ASC, Output";
  5. You should be able to send PM's. I have sent you a PM with new password for Mr. Chidi account
  6. Ok so the DB_Connect object returns the mysqli instance. The mysqli instanced is stored in the $db property for the DB_Functions class on line 12 $this->db = new DB_Connect(); In that case in your DB_functions class wherever you see mysqli_query( you replace it with either $this->db->query( or as mysqli_query($this->db, Example for the query used in the forgotPassword method $result = $this->db->query("UPDATE `users` SET `encrypted_password` = '$newpassword',`salt` = '$salt' WHERE `email` = '$forgotpassword'"); // or written as $result = mysqli_query($this->db, "UPDATE `users` SET `encrypted_password` = '$newpassword',`salt` = '$salt' WHERE `email` = '$forgotpassword'"); Where you use mysqli_insert_id you need to pass the mysqli instance to it, eg mysqli_insert_id($this->db) or write it as $this->db->insert_id;
  7. dirname(__FILE__) will be returning the directory of the current script, for example it will return this file path C:\xampp\htdocs\food\admin\crud\customers You will have to use dirname(dirname(dirname(__FILE__))) to get back to the food directory. The better solution would be to add your admin directory to a constant, then prefix your filepaths using the ADMIN constant, example define('ADMIN', 'C:/xampp/htdocs/food/admin'); // or as // define('ADMIN', dirname(dirname(dirname(__FILE__))) // prefix filepaths with ADMIN constant include ADMIN . '/includes/admin-header.php'; include ADMIN . '/includes/admin-navbar.php'; include ADMIN . '/admin-functions.php'; include ADMIN . '/db/dbconnect.php';
  8. The other places error message will be In your servers error logs.
  9. Remove the forward slash after span in your xpath $items[price] = $xpath->query("//div[@class='price-box']//span[@class='regular-price']//span[@class='price']")->item(0)->textContent
  10. The javascript code you posted, only has an onchange event handler for the adult dropdown menu. You will need to apply the onchange even hander to the children dropdown menu too in order for the price to be updated when the option changes. Example code https://jsfiddle.net/evhuk7mv/
  11. I see what you mean now. You don't see the error message because it is output between the html <select></select> tags. The browser will not show any text between these tags, unless it is between the <option> tags. This is why you have to right click view source to see the error message. If you had called the GetReason function before the <select> tag then you will see the error message, eg your code was <? $qReason = GetReason(); ?> <select name="Reason"> <? while($row = mysql_fetch_array($qReason)) { ?> <option value="<?=$row['ReasonID']?>" <? if($_SESSION['MyReason'] == $row['ReasonID']) {?> selected <? }?>><?=$row['Reason']?></option> <? } ?> </select>
  12. You get the error because you renamed the function from GetReason to GetReason2. I asked for the code for the code that defines the GetReason() function
  13. So whats the code for the GetReason() function?
  14. PHP wont show errors unless you have enabled PHP's error reporting. Try adding the following two lines at the top of your script (or enable the those settings within your php.ini) ini_set('display_errors', 1); error_reporting(E_ALL); In your code you are including a file called SecureFunctionsBank.php (no forwardslash before Bank.php) on line 3 require("secure/SecureFunctionsBank.php"); Are you sure that is the correct path?
  15. Change $mysqli-> to be $link_id->
  16. Code for fetching the results will be $results = $mysqli->query($link_id, $select); while ($query_data = $results->fetch_row())) { See respective manual pages on mysqli here http://php.net/mysqli http://php.net/mysqli.query http://php.net/mysqli-result.fetch-row
  17. Try $query = "SELECT * FROM `table` WHERE date > DATE_SUB(NOW(), INTERVAL 1 MONTH) AND date < '2015-08-01' ORDER BY Date DESC";
  18. Whats your question/problem?
  19. Try changing joke.id in the query to just id If the error still persists then change change $resultat = mysqli_query($db_connection, $requete); to be $resultat = mysqli_query($db_connection, $requete) or trigger_error('SQL Error: ' . $db_connection->error);
  20. BTW If you are finding the text hard to read in the browser console, click on the console and hold down the Ctrl key and press either the - or + keys (or mouse wheel up and down) to re-size the text.
  21. akphidelt2007 is correct, line 160 ( $_SESSION['id']=$row["id"]; ) in project.php is overwriting the user id stored in $_SESSION['id']. This is why it does not show the users projects when you hit the browsers back button. I do not see why the project info need to be saved in the session for? Whats the purpose for this?
  22. Thar wordpress query function returns the results in an array. So you can use count echo 'Number of entries found:' . count($hauntcount);
  23. I recommend you use an existing SMTP service, such as gmail and use PHP scripts such as phpmailer or swiftmailer for sending emails.
  24. You are getting that error because of the comma at the end of line 34 in Topic.php $this->db->query("SELECT topics.*, categories.*, users.username, users.avatar, //<-- delete this comma
  25. Not sure why but you are using commas, where you should be using quotes, highlighted below preg_match (‚#<!-- START ‚. $tag . ‚ -->(.+?)<!-- END ‚. $tag . ‚ -->#si', $this->content, $tor); ^ ^ ^ ^ ^ | | | | | +------------+---------+ -----------------+---------+ | These commas should be single quotes not commas
×
×
  • 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.