Search found 205 matches
- Wed Dec 05, 2012 9:02 pm
- Forum: PHP
- Topic: cannot edit profile
- Replies: 89
- Views: 11302
Re: cannot edit profile
Post your two inc.php files.
- Wed Dec 05, 2012 5:06 pm
- Forum: PHP
- Topic: photo gallery
- Replies: 46
- Views: 6775
Re: photo gallery
[syntax=php]<?php foreach ($albums as $album) { foreach ($images as $image) { echo'<a href="view_album.php?album_id=', $album['id'],'&image_id=uploads/', $image['album'], '/', $image['id'], '.', $image['ext'], '"><img src="uploads/thumbs/', $image['album'], '/', $image['id'], '.',...
- Wed Dec 05, 2012 1:32 am
- Forum: PHP
- Topic: cannot edit profile
- Replies: 89
- Views: 11302
Re: cannot edit profile
Sounds like you aren't even starting the session. Add session_start(); to the very top of your script right after your first <?php tag. If that does nothing post your two inc.php files I believe it is init.inc.php and user.inc.php I'm not sure as I've never followed this tutorial.
- Tue Dec 04, 2012 1:02 pm
- Forum: PHP
- Topic: cannot edit profile
- Replies: 89
- Views: 11302
Re: cannot edit profile
You have parentheses around $username I don't think it matters but might be worth changing.
I believe Temor is on to something as well.
I believe Temor is on to something as well.
- Sun Dec 02, 2012 6:08 pm
- Forum: PHP
- Topic: PHP Blog Query
- Replies: 3
- Views: 985
Re: PHP Blog Query
I believe your query should be like this. I have never needed to do such a query before so I don't know. [syntax=sql] function get_posts() { $sql = "SELECT `posts`.`post_id` AS `id`, `posts`.`post_title` AS `title`, LEFT(`posts.post_body`, 512) AS `preview`, `posts`.`post_user` AS `user`, DATE_...
- Sat Dec 01, 2012 5:16 pm
- Forum: PHP
- Topic: PHP Blog Tutorial [Issue]
- Replies: 2
- Views: 826
Re: PHP Blog Tutorial [Issue]
Change all the apostrophes around your column names to backticks `
- Sat Dec 01, 2012 2:40 am
- Forum: PHP
- Topic: PHP Blog Query
- Replies: 3
- Views: 985
Re: PHP Blog Query
Change all the apostrophes around your column names to backticks `
- Fri Nov 30, 2012 3:54 pm
- Forum: Tutorials
- Topic: Errors after having completed the blog with comments tut.
- Replies: 3
- Views: 1284
Re: Errors after having completed the blog with comments tut
"Parse error: syntax error, unexpected $end in /usr/local/www/project/A._____/website + blog/blog/blog_post.php on line 35" Lines 6-10: [syntax=php]if (isset($_POST['user'], $_POST['title'], $_POST['body'])){ add_post($_POST['user'], $_POST['title'], $_POST['body']); header('Location: blo...
- Wed Nov 28, 2012 3:34 am
- Forum: PHP
- Topic: cannot edit profile
- Replies: 89
- Views: 11302
Re: cannot edit profile
I don't see anywhere that you are generating $uid from. Add echo mysql_error() after your update query like this [syntax=php]mysql_query("UPDATE `users` SET `grad` = '{$grad}', `drzava` = '{$drzava}',`fan` = '{$fan}', `website` = '{$website}' WHERE `uid`='{$uid}'"); echo mysql_error();[/sy...
- Wed Nov 28, 2012 1:04 am
- Forum: PHP
- Topic: cannot edit profile
- Replies: 89
- Views: 11302
Re: cannot edit profile
or you can simply [syntax=php]$query = mysql_query("UPDATE `table` SET `field1` = '{$field1}', `field2` = '{$field2}' WHERE `id`='{$id}'"); print_r = $query;[/syntax] print_r is a php function and will give a syntax error the way you are using. As far as I see there is no reason why they ...
- Sat Nov 24, 2012 4:00 am
- Forum: PHP
- Topic: my_sql_fetch problem
- Replies: 12
- Views: 1946
Re: my_sql_fetch problem
Has uid been set in the url? Profile.php?uid=1234
Re: PHP_SELF
$_SERVER['PHP_SELF'] is a huge security risk, but that's not the point I guess. PHP_SELF looks for the file itself so it is not possible.
- Wed Nov 21, 2012 8:03 pm
- Forum: Tutorials
- Topic: PHP Tutorial Register and Login
- Replies: 5
- Views: 1460
Re: PHP Tutorial Register and Login
I'm pretty sure if he minded, he wouldn't use it in a tutorial.
- Tue Nov 20, 2012 12:57 pm
- Forum: PHP
- Topic: my_sql_fetch problem
- Replies: 12
- Views: 1946
Re: my_sql_fetch problem
[syntax=php]`drzava` AS `drzava',[/syntax]
You have an apostrophe after drzava instead of a backtick
You have an apostrophe after drzava instead of a backtick
- Mon Nov 19, 2012 1:28 pm
- Forum: PHP
- Topic: my_sql_fetch problem
- Replies: 12
- Views: 1946
Re: my_sql_fetch problem
There is most likely a problem with your query. Add [syntax=php]echo mysql_error();[/syntax]
- Mon Nov 19, 2012 1:25 pm
- Forum: Tutorials
- Topic: PHP Tutorial Register and Login
- Replies: 5
- Views: 1460
Re: PHP Tutorial Register and Login
You can not have any output before a header. This includes any html or echo/printing. I suspect this is what is causing your error.
- Sat Nov 10, 2012 10:24 pm
- Forum: (X)HTML
- Topic: Placeholder doubt
- Replies: 9
- Views: 3622
Re: Placeholder doubt
And in case the user has javascript disabled you can always put it in a <noscript>
- Fri Nov 09, 2012 6:17 pm
- Forum: (X)HTML
- Topic: Placeholder doubt
- Replies: 9
- Views: 3622
Re: Placeholder doubt
Question to ExtremeGaming; would I be able to use that, but with value? Because IE simply refuses to use PlaceHolder. Yes just change this.placeholder to this.value However, you will need to remove the onblur because it will submit whatever you are setting the default value to, regardless of what y...
- Thu Nov 08, 2012 3:55 pm
- Forum: (X)HTML
- Topic: Placeholder doubt
- Replies: 9
- Views: 3622
Re: Placeholder doubt
If you mean when clicked, try: [syntax=xhtml]<input type="text" placeholder="Enter Message..." onfocus="this.placeholder = ''" onblur="this.placeholder = 'Enter Message...'" />[/syntax] If you really mean hover, try: [syntax=xhtml]<input type="text" ...
- Tue Oct 23, 2012 2:03 am
- Forum: CSS / Styling
- Topic: Overlapping text
- Replies: 1
- Views: 1444
Overlapping text
-- Solved (ty Helx
) --
![Wink ;)](./images/smilies/icon_e_wink.gif)
- Thu Oct 18, 2012 4:58 pm
- Forum: Tutorials
- Topic: Problem re the blog tutorial - PHP warning
- Replies: 5
- Views: 1243
Re: Problem re the blog tutorial - PHP warning
Make sure there are no spaces before the <?php tag and after the ?> tag