Search found 27 matches
- Mon Jan 16, 2012 10:59 am
- Forum: Tutorials
- Topic: Avatar's Showing up as 0kb on server
- Replies: 20
- Views: 1849
Re: Avatar's Showing up as 0kb on server
I have made some various changes to the system and I have outputted what is in the file array below. Array ( [avatar] => Array ( [name] => Sonic.jpg [type] => image/jpeg [tmp_name] => /var/tmp/php.waq8n [error] => 0 [size] => 48477 ) ) But I still get this error message. Warning: imagecreatefromjpeg...
- Tue Jan 10, 2012 8:01 pm
- Forum: Tutorials
- Topic: Avatar's Showing up as 0kb on server
- Replies: 20
- Views: 1849
Re: Avatar's Showing up as 0kb on server
It just says nothing. None of those echo statements work. Very weird. Ill try that thanks Made a little bit of progress, still no images but I get the following error Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: '/var/tmp/phpVtaWyp' is not a valid JPEG file in /web/stud/u0963643/us...
- Tue Jan 10, 2012 7:43 pm
- Forum: Tutorials
- Topic: Avatar's Showing up as 0kb on server
- Replies: 20
- Views: 1849
Re: Avatar's Showing up as 0kb on server
Thanks, its strange, its still not working :( <?php include('core/init.inc.php'); if(in_array(array('email','location','about'),$_POST)) { $errors = array(); if(filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) { $errors[] = "The email address you entered is not valid"; } if(pr...
- Tue Jan 10, 2012 6:11 pm
- Forum: Tutorials
- Topic: Avatar's Showing up as 0kb on server
- Replies: 20
- Views: 1849
Re: Avatar's Showing up as 0kb on server
I tried the following, the image did not submit nor did it give me an error message. function set_profile_info($email, $location,$about,$avatar) { $email = mysql_escape_string(htmlentities($email)); $about = mysql_escape_string(nl2br(htmlentities($about))); $location = mysql_escape_string($location)...
- Tue Jan 10, 2012 5:26 pm
- Forum: Tutorials
- Topic: Avatar's Showing up as 0kb on server
- Replies: 20
- Views: 1849
Re: Avatar's Showing up as 0kb on server
So once the image is uploaded how would I go about resizing it?
- Tue Jan 10, 2012 4:40 pm
- Forum: Tutorials
- Topic: Avatar's Showing up as 0kb on server
- Replies: 20
- Views: 1849
Re: Avatar's Showing up as 0kb on server
Thanks very much with your wise words of wisdom.
Does the move_uploaded_file() function allow you to resize an image?
Thanks
Does the move_uploaded_file() function allow you to resize an image?
Thanks
- Tue Jan 10, 2012 2:39 pm
- Forum: Tutorials
- Topic: Avatar's Showing up as 0kb on server
- Replies: 20
- Views: 1849
Re: Avatar's Showing up as 0kb on server
Ok, thank you very much
- Tue Jan 10, 2012 2:29 pm
- Forum: Tutorials
- Topic: Avatar's Showing up as 0kb on server
- Replies: 20
- Views: 1849
Re: Avatar's Showing up as 0kb on server
user.inc.php <?php //fetches all of the users from the table function fetch_users() { $query = 'SELECT user_id, user_username FROM users'; $result = mysql_query('SELECT user_id AS `id`, user_username AS `username` FROM users'); $users = array(); while(($row = mysql_fetch_assoc($result)) !==false) { ...
- Tue Jan 10, 2012 2:25 pm
- Forum: Tutorials
- Topic: Avatar's Showing up as 0kb on server
- Replies: 20
- Views: 1849
Avatar's Showing up as 0kb on server
Hi All, I have recently completed the avatar tutorial which adds onto the user profiles. I am currently struggling as it uploads an image onto the server but then either throws up the error that the jpeg is not valid or uploads an image which is blank and 0kb in size. Could anyone please direct me t...
- Tue Jan 10, 2012 1:59 pm
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Hi Temor,
Right now I feel so stupid, that worked a treat, I''d like to thank you for all your help over the past few days
Happy coding
Thank again
Jamie
Right now I feel so stupid, that worked a treat, I''d like to thank you for all your help over the past few days
Happy coding
Thank again
Jamie
- Tue Jan 10, 2012 1:56 pm
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Hi Temor,
Thanks again. But I have passwords in the database which I have used to test but these passwords still do not work, unless the peice of code is looking for a password with sha1 coding in which case, I feel very silly .
Ill have a look and test that now
Thanks again
Jamie
Thanks again. But I have passwords in the database which I have used to test but these passwords still do not work, unless the peice of code is looking for a password with sha1 coding in which case, I feel very silly .
Ill have a look and test that now
Thanks again
Jamie
- Tue Jan 10, 2012 10:15 am
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Ill check the user exists function to see if that works because it means that im making a connection that way. EDIT: There must be a connection since other sql functions work within the project. :/ I have no idea whats wrong with it... $user = mysql_real_escape_string($user); $pass = sha1($pass); $t...
- Tue Jan 10, 2012 1:35 am
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Yeah, they both show up. Its almost like they cant talk to the database which weird.
Array ([username] => jaymeh [password] => jaymeh
Array ([username] => jaymeh [password] => jaymeh
- Tue Jan 10, 2012 12:31 am
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Nope, still not working . If i change it to true, it works but so does every other user/password combination. Which is strange. The information I'm typing in is also correct. I even tried creating the whole login system again today. I have hit exactly the same problem.
- Mon Jan 09, 2012 11:58 pm
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Hi, where do I put print_r($errors)
on the login page?
EDIT: I got Username/Password incorrect.
EDIT: Which is the same as what I got when I tried to create the userlogin system a second time.
on the login page?
EDIT: I got Username/Password incorrect.
EDIT: Which is the same as what I got when I tried to create the userlogin system a second time.
- Mon Jan 09, 2012 11:32 pm
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Hi Temor,
I found one of our errors, the one on line 95 with the mysql, I was missing a ` after user_password.
My final issue now, at least I hope is the one of line 55 with the foreach() invalid arguement.
Although the valid credentials validation still isnt working correctly.
I found one of our errors, the one on line 95 with the mysql, I was missing a ` after user_password.
My final issue now, at least I hope is the one of line 55 with the foreach() invalid arguement.
Although the valid credentials validation still isnt working correctly.
- Mon Jan 09, 2012 1:52 pm
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Sorry, which function would this code need to be corrected?
Thanks again
Jamie
$result = mysql_query("SELECT (`user_id`) FROM `users` WHERE `user_username` = '{$_SESSION['username']}'");Or do you mean that this line needs placing on line 27 of login.php?
Thanks again
Jamie
- Sun Jan 08, 2012 4:33 pm
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Thanks thats better at least I know a little more about whats wrong. I have included that in the login page. valid_credentials was a function used in my user.inc.php file. Here are the errors I received from the page when I ran it. Warning: mysql_result(): supplied argument is not a valid MySQL resu...
- Sat Jan 07, 2012 7:42 pm
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Where would I be able to find the PHP.ini file so I can change the debugging settings? My site is currently hosted on my university server, so I don't have access to a lot of features.
- Fri Jan 06, 2012 7:45 pm
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Ok then, well I don't get any errors outputted but I don't think the valid credentials works because I tried it with an incorrect password combination and it didn't output the error message. I'm not sure if this has something to do with it. valid_credentials is a php function isn't it? If its not it...
- Fri Jan 06, 2012 4:17 pm
- Forum: Tutorials
- Topic: Linking the User Login Sytem to the Profile System
- Replies: 33
- Views: 3581
Re: Linking the User Login Sytem to the Profile System
Well the Register page works well anyway. All I did was copy and paste some of the code from the registration page but I am still having problems with the login process. For some reason it won't redirect to the profile page. It just sticks on the login page and resets all of the form data. Here is t...