Jump to content

IanA

Members
  • Posts

    38
  • Joined

  • Last visited

IanA's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Wow, yes most definitely update. The latest version of PHP 4 has been depricated since 2008...
  2. Is it a premium template? If so, surely you could speak to the creator's and ask for some support? If you provide some error messages from your error log then that may give you some indication as to what is wrong. I guess there's something that's gone wrong with the initial setup of the template or an issue with the template itself.
  3. Use relative URLs, depending on where the classes directory lies in your structure, you could do the following: spl_autoload_register(function($class) { require_once ($_SERVER['DOCUMENT_ROOT'] . '/classes/' . $class . '.php'); }); From your error you can see that your autoloader can't find the file to include.
  4. In what way is the date/time incorrect? $date = date('Y-m-d'); $time = date('H:i:s'); Try the above, that will give you the date and time of the current timestamp.
  5. Hey, did something happen with the Facebook login for the phpFreaks forum recently? Been trying to log in for some time now but I kept receiving errors. Glad it's back working now!
  6. The variable $subject is declared inside an if statement. You are then trying to access the variables outside this statement and if it hadn't been entered, the variables would not have been initialized. Try initializing the variables to null above the line: if (!empty($_POST['submit'])) {
  7. What I am referring to is the execution of this line of code $id = $this->db->lastInsertId(); It should be ran following the execution of: $insert->execute(array( $id = $this->db->lastInsertId(); //REMOVE THIS LINE ':member_id' => $abc['member_id'], ':username' => $abc['username'], ':name' => $abc['name'], ':password' => $abc['password'], ':address' => $abc['address'], ':phone' => $abc['phone'], ':nik_numb' => $abc['nik_numb'], ':gender' => $abc['gender'], ':role' => $abc['role'] )); //AND PLACE IT HERE
  8. Do you have a working SMTP server running on your localhost also? The mail function won't simply send an e-mail for you unless you have SMTP set up too. There are some good free examples such as smtp4dev or fakesmtp that should help you get on your way.
  9. That should work? Is there a redirect on the url you're trying to go to, or is there something in the .htaccess file which is automatically putting 'actions' into the url?
  10. And what does your form look like? Can you provide that?
  11. First, you might want to hide the log in details for all to see... Try adding the following: $mail->SMTPSecure = "tls"; $mail->Port = 587;
  12. It would be interesting to know a good solution to this. My first thoughts would be to have different threads handling this, one handling your presentation logic and another handling the e-mail side of things - I may be incorrect here, so will be best to wait for some of the more experienced developers to have their input.
  13. The query that Barand gave you should do exactly that, as it is using the BETWEEN keyword, it will only return results between the values passed in. Maybe check the user input to ensure the values are being passed through correctly? Obviously Barand has given you two variables: $minprice = 1000; // would come from user input $maxprice = 10000; These were provided as an example only, if you're still using these static values in your query then it will always return that range.
  14. Do you understand simple HTML in order to create your table structure, if not, I would recommend learning this first before worrying about the PHP side of things. If you do know how to create the table structure in HTML, what exactly is it that you want help with? Do you know how to query the database with PHP?
×
×
  • 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.