Jump to content

StreamersUnited

New Members
  • Posts

    4
  • Joined

  • Last visited

StreamersUnited's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. how much would I need to pay just have this error fixed?
  2. I paid $500 for a guy to code it; he showed me via his site the signup worked and then sent me all files, but mine has that issue. One guy told me that this guy coding sucked.
  3. <?php if($_REQUEST) { $uname = $_REQUEST["set_username"]; $email = $_REQUEST["set_email"]; $pword = $_REQUEST["set_password"]; if (isset($_POST['submit1'])) { include 'db_connect.php'; $USERNAME=$_REQUEST["username"]; $PASSWORD=$_REQUEST["password"]; $results = $conn->query("SELECT * FROM strea345_db1 where username='$USERNAME' AND password='$PASSWORD'"); if($row = $results->fetch_assoc()) { session_start(); $id=$row['username']; $_SESSION["username"] = $id; //echo $id; header("Location: welcome.php"); } else { header("Location: error1.php"); } // Frees the memory associated with a result $results->free(); } if($email && $pword) { include 'db_connect.php'; $query = "SELECT * FROM strea345_db1 WHERE username ='$uname' || username ='$uname' && email ='$email' ||email ='$email' "; $result = mysqli_query($conn, $query); if (mysqli_num_rows($result) == 0) { $stmt = $conn->prepare("INSERT INTO strea345_db1 (username, password, email) VALUES (?, ?, ?)"); //$password = md5($password); $stmt->bind_param('sss', $uname,$pword,$email); /* execute prepared statement */ $stmt->execute(); if ($stmt->error) {error_log("Error: " . $stmt->error); } $success = $stmt->affected_rows; /* close statement and connection */ $stmt->close(); /* close connection */ $conn->close(); error_log("Success: $success"); if ($success > 0) { error_log("User '$email' created."); header("Location: index.html"); } else { echo '{"success":0,"error_message":"Email Exist."}'; } } else { header("Location: error.php"); } } else { echo '{"success":0,"error_message":"Invalid Email."}'; } } else { echo '{"success":0,"error_message":"Invalid Data"}'; } ?> What looks like it needs fixed?
  4. My error log: "Call to a member function fetch_assoc() on a non-object in /home/strea345/public_html/usersignup.php on line 17" Line 17: if($row = $results->fetch_assoc()) This happens when users try signing up or signing in; gives an error to them saying Any solution?
×
×
  • 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.