Jump to content

Anxious

Members
  • Posts

    100
  • Joined

  • Last visited

    Never

About Anxious

  • Birthday 06/10/1993

Profile Information

  • Gender
    Male
  • Location
    Hull

Anxious's Achievements

Member

Member (2/5)

0

Reputation

  1. It does what 'include' means. It works in the same way as if you'd include a css file. If the included file isn't in reach, the script will still run. Just may not work as you wanted. Like if a CSS file is missing, the web page wont look as it should do. It works the same. If you require a file, the script WONT run without that file in reach.
  2. Hello, I have researched a bit about redirections in .htaccess. I am wanting to redirect my WHOLE website to "www.myvee.co.uk/ohdear.php" However, if I redirect the WHOLE ENTIRE website, it'll cause a redirect error with the "ohdear.php" So I'd have to do a rule for the pages. Any idea what to do? This is what I'd do to redirect the whole entire website Redirect 301 / http://www.myvee.co.uk/ohdear.php This causes a redirect error with 'ohdear.php' as its trying to redirect that page all the time. I have not found out how I'd do a rule, any help appreciated! NOTE: This thread is in the wrong place... maybe try assist me whilst the thread is moved. Thanks.
  3. Any have any suggestions, maybe it could be in the first code I gave, where it processes the values to the code above which enters.
  4. I have gotten this far now <?php function addNewUser($username, $password, $email, $day, $month, $year, $location, $gender, $activ_code){ $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $email = mysql_real_escape_string($email); $day = mysql_real_escape_string($day); $month = mysql_real_escape_string($month); $year = mysql_real_escape_string($year); $location = mysql_real_escape_string(location); $gender = mysql_real_escape_string($gender); $activ_code = mysql_real_escape_string($activ_code); $time = date("F j, Y, g:i"); $dob = $_POST['day'] . "/" . $_POST['month'] . "/" . $_POST['year']; /* If admin sign up, give admin user level */ if(strcasecmp($username, ADMIN_NAME) == 0){ $ulevel = ADMIN_LEVEL; }else{ $ulevel = USER_LEVEL; } $q = "INSERT INTO ".TBL_USERS." VALUES ('$username', '$password', '$ulevel', '$email', '$time', '$location', '$dob', '$gender', '0', '$activ_code', '1')"; return mysql_query($q, $this->connection); } function addNewProfile($username, $password, $email){ $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $email = mysql_real_escape_string($email); $q = "INSERT INTO ".TBL_PROFILE." VALUES ('$username', '$password', '$email', '$slogan', 'Not Set', 'Not Set', 'Not Set', 'Not Set', 'Not Set', 'Not Set')"; return mysql_query($q, $this->connection); } function addNewPhoto($username){ $username = mysql_real_escape_string($username); $q = "INSERT INTO ".TBL_PHOTO." VALUES ('$username')"; mysql_query($q, $this->connection) or die("SQL Was: {$q}<br />Error Was: " . mysql_error()); return true; } ?> There was no change in what the problem is. Still enters values into TBL_USERS, but not TBL_PHOTO & PROFILE
  5. Would it be worth doing it with addNewUser aswell, even though that works fine? or just do it with the other two functions.
  6. Like this? Should I still have the error given on addNewPhoto, or should I keep that as normal being as the error isn't in that part, its on photo and profile. function addNewUser($username, $password, $email, $day, $month, $year, $location, $gender, $activ_code){ $username = mysql_real_escape_string($username); $q = "INSERT INTO ".TBL_PROFILE." VALUES ('$username', '$password', '$email', '$slogan', 'Not Set', 'Not Set', 'Not Set', 'Not Set', 'Not Set', 'Not Set')"; return mysql_query($q, $this->connection); } ?>
  7. So where it says "mysql_query" I'd replace with mysql_real_escape_string() ?
  8. The first snippet of code I gave remains the same. Here is what I've got updated on the second part. <?php function addNewUser($username, $password, $email, $day, $month, $year, $location, $gender, $activ_code){ $time = date("F j, Y, g:i"); $dob = $_POST['day'] . "/" . $_POST['month'] . "/" . $_POST['year']; /* If admin sign up, give admin user level */ if(strcasecmp($username, ADMIN_NAME) == 0){ $ulevel = ADMIN_LEVEL; }else{ $ulevel = USER_LEVEL; } $q = "INSERT INTO ".TBL_USERS." VALUES ('$username', '$password', '$ulevel', '$email', '$time', '$location', '$dob', '$gender', '0', '$activ_code', '1')"; return mysql_query($q, $this->connection); } function addNewProfile($username, $password, $email){ $q = "INSERT INTO ".TBL_PROFILE." VALUES ('$username', '$password', '$email', '$slogan', 'Not Set', 'Not Set', 'Not Set', 'Not Set', 'Not Set', 'Not Set')"; return mysql_query($q, $this->connection); } function addNewPhoto($username){ $q = "INSERT INTO ".TBL_PHOTO." VALUES ('$username')"; mysql_query($q, $this->connection) or die("SQL Was: {$q}<br />Error Was: " . mysql_error()); return true; } ?> One did say use mysql_real_escape_string() however, what are the differences between all the 'mysql's, not sure as to what they do. I haven't tested mysql_real_escape_string() because I don't know where'd I'd exactly insert it and what it should do? Though note that it doesn't even get to addNewPhoto, seeing asit does do addNewProfile either. Thank you.
  9. My webhost updated to PHP 5.2.9 about 1 week ago. Could this be the cause of my problem?
  10. My codes not been updated, if one suggestion dont work, i undo it and try another one.
  11. I have no idea what I've done and where the problem is. I can't find it, ive tried everything
  12. Here. http://www.phpfreaks.com/forums/index.php/topic,250454.0.html
  13. I have posted another thread, with problems on what I'm doing.. but the problem I find atm is that its not registering me.
  14. Error dont show up, the problem what I'm guessing is, seeing as it dont even get to the 'addNewProfile' part, let alone the 'addNewPhoto'.. that the problem would be around addNewProfile
×
×
  • 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.