| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Munky Designs | [resolved] php things have suddenly stopped working, and I have no idea why ok, this is crazy, and driving me insane! as of two days ago, everything worked fine. Now, things are messing up for no reason. I have a key check function, it makes a key on one page, and then checks it on the next. here is a bit of it: Code: $keyCheck = $user->checkKey('loginKey');
echo $keyCheck." is keyCheck<br />";
if ($keyCheck != 1){
echo $keyCheck." You are doing something naughty!!!!";
exit();
}
Second thing, I have a register function, which sends out a validation email. I haven't touched the code in there for 2 weeks, now though, no email is sent. the data is saved to the db, everything echos ok, just no email being sent (and no, it is not in my junk folder :P). The code for it is here: Code: $b = "click this link to validate<br /><a href=\"http://munkydesigns.co.uk/Scripts/validatelogin.php?u=$u&v=$v\">Click here</a>";
$b = @nl2br($b);
$headers = "Content-Type: text/html";
if (!mail($e, "You have registered, click to validate", $b, $headers)) {
echo "something went wrong!";
exit();
}
echo "Welcome ".$u.", you are now registered.<br />However, the account is not yet live, an email has been sent
to the address you supplied, click the link to validate!";
exit();
Please, someone tell me im not going insane, and that there is a really obvious mistake I am making
__________________ Last edited by Albino; 11-12-2007 at 02:43 PM. |
| |
| | #3 (permalink) |
| Munky Designs | I haven't changed anything, which is why this is confusing me so much. I'll ask the host if they have upgraded, but if they have, why would one function which works fine on one page, not work on another (even though they are exactly the same).
__________________ |
| |
| | #4 (permalink) |
| NamePros Member | The most common thing I could suggest is check for globals... eg did you assume $_SESSION['var'] automatically became $var The host may have changed this, so you'd need to use $_SESSION['var'] (Its a huge security risk the first way) The other possibility is something happened to your session().start Bruce |
| |
| | #5 (permalink) |
| Munky Designs | globals are on, but I never assume things like $_SESSION['var'] = $var. also, session_start is in a global file, required_once at the top. its never failed before, I haven't changed anything in it, it just started happening 2 days ago
__________________ |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |