mariocesar Posted January 26, 2007 Share Posted January 26, 2007 The script was working fine, I changed the hosting Co, now I think is php 5, here is the message: Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0[code]<? if ($_POST[user] && $_POST[pass]) { $db = mysql_connect('*****', $user = "****", $pass = "***" ); mysql_select_db("copymailregister", $db); $result = mysql_query ("SELECT * FROM usersreg WHERE name = '".$_POST[user]."'"); if (mysql_num_rows($result) == 0) { $result = mysql_query ("INSERT INTO usersreg (name, password, company, email, address, city, state, zipCode) VALUES ('".$_POST[user]."', PASSWORD('".$_POST[pass]."'),'".$company."', '".$email."', '".$address."', '".$city."', '".$state."', '".$zipCode."')"); if ($result) { $logged_in_user = $_POST[user]; session_register("logged_in_user"); echo "<div class='templine'>Your details have been added to the database, ".$_POST[user]."<BR><BR>"; echo "<div class='powerftp'><img src='images/arrow2.gif'> <A HREF='main.php'>My Account</A></div><BR>"; echo "<div class='powerftp'><img src='images/arrow2.gif'> <A HREF='logout.php'>logout</A></div>"; exit; } else { echo "<div class='templine'>Sorry, there has been a technical hitch. We cannot enter your details.</div>"; exit; } } else { echo "<div class='templine'>Sorry, that username has been taken. Please try another.<BR></div>"; } } else if ($_POST[user] || $_POST[pass]) { echo "<div class='templine'>Please fill in all fields..</div>"; } ?>[/code]Thanks.(edited by kenrbnsn to remove db login info) Quote Link to comment Share on other sites More sharing options...
jumpenjuhosaphat Posted January 26, 2007 Share Posted January 26, 2007 http://us3.php.net/session_registerTake a look at that page....It's basically saying to use $_SESSION in lieu of session_register, because if register globals is disabled, the script simply will not work. Quote Link to comment Share on other sites More sharing options...
Nelak Posted January 26, 2007 Share Posted January 26, 2007 dont post ur database login info, its a major security risk. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.