-
Posts
100 -
Joined
-
Last visited
Never
About Anxious
- Birthday 06/10/1993
Profile Information
-
Gender
Male
-
Location
Hull
Anxious's Achievements
Member (2/5)
0
Reputation
-
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.
-
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.
-
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
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. -
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
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 -
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
Would it be worth doing it with addNewUser aswell, even though that works fine? or just do it with the other two functions. -
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
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); } ?> -
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
So where it says "mysql_query" I'd replace with mysql_real_escape_string() ? -
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
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. -
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
My webhost updated to PHP 5.2.9 about 1 week ago. Could this be the cause of my problem? -
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
My codes not been updated, if one suggestion dont work, i undo it and try another one. -
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
I have no idea what I've done and where the problem is. I can't find it, ive tried everything -
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
I've looked.. and I've found nothing. -
Uploading Images - Image Albums - Profile Photo - Database?
Anxious replied to Anxious's topic in PHP Coding Help
Here. http://www.phpfreaks.com/forums/index.php/topic,250454.0.html -
Uploading Images - Image Albums - Profile Photo - Database?
Anxious replied to Anxious's topic in PHP Coding Help
I have posted another thread, with problems on what I'm doing.. but the problem I find atm is that its not registering me. -
Added up profile photo's but now.. you cant register properly
Anxious replied to Anxious's topic in PHP Coding Help
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