Search the Community
Showing results for tags 'fatalerror'.
-
Hello We have a testing site where users create a profile then take an aptitude test. Was working fine several months ago but we're trying to set up tests now and when the user enters their information and hits submit, we get these errors. (first it was the white screen, then I turned on the errors and received this) Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in ~/inc/connect.inc.php on line 11 Notice: Undefined variable: i_price in ~/profile-2.inc.php on line 97 Fatal error: Call to undefined function session_register() in ~/profile-2.inc.php on line 101 I'm assuming the Fatal Error is what's causing the profile not to be set up(and thus get the white screen). The code in profile-2 is: # Create new record: $now = time(); $password_name = random_password(PASS_LENGTH); $password_hash = bin2hex(mhash(MHASH_MD5, $password_name)); $i_qry2 = db_qry("INSERT INTO reports(createdate,passhash,fname,lname,age,gender,sport,loc,phone,address1,address2,city,state,zip,email,price) VALUES ($now,'$password_hash','$f_firstname','$f_lastname',$f_age,$f_gender,'$f_sport','$f_loc','$f_phone','$f_address1','$f_address2','$f_city','$f_state','$f_zip','$f_email','$i_price')") or die("Error: profile-2, SQL request error #2 ".mysql_error()); $i_sid = mysql_insert_id($sql_link); # Register SID in session: session_register('r_id'); <<<<this is line 101 $_SESSION['r_id'] = $i_sid; session_register('r_pass'); $_SESSION['r_pass'] = ''; session_register('r_ccode'); $_SESSION['r_ccode'] = stripslashes($f_ccode); Does anyone have a suggestion on what might be the problem and how I go about fixing it? Thanks in advance.
- 6 replies
-
- php
- fatalerror
-
(and 1 more)
Tagged with:
-
I'm new to coding and prepared statements. I'm getting: "Fatal error: Call to a member function bind_param() on a non-object in /home/content/01/3251001/html/Manage-Users/acc-files/updateRecord.php on line 17" For this: <?php include "db_connect.php"; if(isset($_POST['UserID'])){ $stmt = $con -> prepare('UPDATE UserList SET Status = ?, FirstName = ?, LastName = ?, Username = ?, Email = ?, Department = ?, Manager = ?, WHERE UserID = ?'); $stmt -> bind_param('isssssss', /* Line 17 */ $_POST['Status'], $_POST['FirstName'], $_POST['LastName'], $_POST['Username'], $_POST['Email'], $_POST['Department'], $_POST['Manager'], $_POST['UserID']); $stmt->execute(); } Thank you in advance for helping.