Jump to content

dario

Members
  • Posts

    19
  • Joined

  • Last visited

dario's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i think i dont have a querry yet xs is it ok to send you the file i have? or dont you want to check it? I am really struggeling i have been adjusting code and copying codes all day long and no succes yet
  2. i prefer using the radiobuttons because i only have like 3 options for every piece of the computer. where do i have to define the variables because i have an error if i use your code it says : Notice: Undefined variable: results in C:\wamp\www\gip\pp3.php on line 63 Warning: Invalid argument supplied for foreach() in C:\wamp\www\gip\pp3.php on line 63 line 63 is: foreach($results as $record) {
  3. Im making a webshow as task for school. this webshop lets you build a PC wich you can assemble yourself. I was thinking that I could use radiobuttons for every different piece of the computer. example: Processor: -i3 (linked to the processor in my DB) -i5 (linked to the processor in my DB) -i7 (linked to the processor in my DB) is there a way that i can add sql commands in my value of the radiobutton?
  4. I have a database with a lot of items in it for a webshop, and i want to use radiobuttons connected to the items in the database, is there a way to do that or do i have to do it in a different manner?
  5. the function login_check checks the user_id and the login_string. that seems to work as you said so. can it be when i click login to go to the other page that it doesnt see that i logged in or something?
  6. well im looking for the solution for about 1 hour and with no result. i'm a php beginner that's why i posted this topic. I have read the login check function for about 50 times and I really dont see the bug in it. i have made new user's in my database to check if it was the user that was causing the bug. I really want to learn from this but its just that looking for something you dont know yet is pretty damn hard. once i see how its done once i will never have to ask it again.
  7. I got the code from this tutorial maybe it helps. http://www.wikihow.com/Create-a-Secure-Login-Script-in-PHP-and-MySQL
  8. I have a problem when I try to log into my website it looks like my login check function always says the login is failed. I have no errors or something it just never works to log in succesfully i dont have a clue how i have to solve this =( functions.php process_login.php login.php protected_page.php
  9. // TODO: // We'll also have to account for the situation where the user doesn't have // rights to do registration, by checking what type of user is attempting to // perform the operation. if (empty($error_msg)) { // Create a random salt $random_salt = hash('sha512', uniqid(openssl_random_pseudo_bytes(16), TRUE)); // Create salted password $password = hash('sha512', $password . $random_salt); // Insert the new user into the database if ($insert_stmt = $mysqli->prepare("INSERT INTO members (username, email, password, salt) VALUES (?, ?, ?, ?)")) { $insert_stmt->bind_param('ssss', $username, $email, $password, $random_salt); // Execute the prepared query. if (! $insert_stmt->execute()) { header('Location: ../error.php?err=Registration failure: INSERT'); } } header('Location: ./register_success.php'); } } ?> this is where the bug is but i cant really see it xs
  10. Fatal error: Call to undefined function openssl_random_pseudo_bytes() in C:\wamp\www\gip\includes\register.inc.php on line 52
×
×
  • 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.