Search found 1179 matches
- Tue Oct 23, 2012 11:38 am
- Forum: Tutorials
- Topic: PHP blog tut, post and comments fail insert [Solved]
- Replies: 17
- Views: 3580
Re: PHP blog tut, blog post and comments failing to insert.
I did try the live version. You could probably remove the mysql_error part entirely, seeing as you don't have any mysql errors. You don't need the var_dump either since there's obviously nothing wrong with $_POST. have you tried putting dummy data through add_comment to see if it adds the comment as...
- Tue Oct 23, 2012 9:14 am
- Forum: Tutorials
- Topic: PHP blog tut, post and comments fail insert [Solved]
- Replies: 17
- Views: 3580
Re: PHP blog tut, blog post and comments failing to insert.
[syntax=php]if (isset($_GET['pid'], $_POST['user'], $_POST['body'])) { if (add_comment($_GET['pid'], $_POST['user'], $_POST['body'])) { header("Location: blogread.php?pid={$_GET['pid']}"); } else { header('Location: bloglist.php'); } die(mysql_error()); }[/syntax] remove the last die, or c...
- Tue Oct 23, 2012 12:54 am
- Forum: Tutorials
- Topic: PHP blog tut, post and comments fail insert [Solved]
- Replies: 17
- Views: 3580
Re: PHP blog tut, blog post and comments failing to insert.
Try changing this part of get_comments [syntax=php] $return = array(); while (($row = mysql_fetch_assoc($comments)) !== false){ $return[] = $row; }[/syntax] to this: [syntax=php] $return = array(); while (($row = mysql_fetch_assoc($comments)) !== false){ $return['user'] = $row['user']; $return['body...
- Mon Oct 22, 2012 9:58 pm
- Forum: PHP
- Topic: Getting user_id using information from another column
- Replies: 3
- Views: 721
Re: Getting user_id using information from another column
Well, you can't just echo it straight away, and you should use mysql_result instead since you're only fetching one value. [syntax=php] $res = mysql_query("SELECT `user_id` FROM `users` WHERE `user_email` = '{$email}'"); $id = mysql_result($res); [/syntax] echoing $id should give you the id.
- Mon Oct 22, 2012 11:33 am
- Forum: PHP
- Topic: Getting user_id using information from another column
- Replies: 3
- Views: 721
Re: Getting user_id using information from another column
Well, this won't work, for obvious reasons. [syntax=php]$res = mysql_query("SELECT `user_id` FROM `users` WHERE '{$email}' = `user_id`");[/syntax] user_id is not equal to the email address. user_id is an integer, user_email is an email. This should work. [syntax=php]$res = mysql_query(&quo...
- Mon Oct 22, 2012 7:34 am
- Forum: PHP
- Topic: Jacek's send HTML mail issue
- Replies: 14
- Views: 2139
Re: Jacek's send HTML mail issue
pando media booster isn't a program you install. it comes with lots of different games to enhance performance. it's not visible unless you look in the process tab in your task manager.
- Sun Oct 21, 2012 7:03 pm
- Forum: Tutorials
- Topic: PHP Tutorial: Blog (Including Commenting) blank page
- Replies: 1
- Views: 622
Re: PHP Tutorial: Blog (Including Commenting) blank page
on line 10, you're not actually printing it out. You need to remove the variable/dollar sign before print_r.
- Sun Oct 21, 2012 6:56 pm
- Forum: Tutorials
- Topic: Problem re the blog tutorial - PHP warning
- Replies: 5
- Views: 1250
Re: Problem re the blog tutorial - PHP warning
is this:[syntax=php]header('Location: blog_list.php');[/syntax]
redirecting to itself? Then maybe you don't need it?
redirecting to itself? Then maybe you don't need it?
- Sun Oct 21, 2012 6:50 pm
- Forum: PHP
- Topic: resize watermark image
- Replies: 6
- Views: 1146
Re: resize watermark image
It looks like there might be a few other ways to do that more efficiently.
$newcopy never gets a value assigned to it. At least not first function you posted. Start there.
$newcopy never gets a value assigned to it. At least not first function you posted. Start there.
- Sun Oct 21, 2012 6:40 pm
- Forum: PHP
- Topic: Jacek's send HTML mail issue
- Replies: 14
- Views: 2139
Re: Jacek's send HTML mail issue
I'm having some problems with that lol I use Dreamweaver CS6 and is not configured to run PHP files... I also use WebMatrix and when I run my contact it gives me a 404.20 HTTP error page... HTTP Error 404.20 - Not Found some time ago I had Wamp but had to delete it because the port :80 was already ...
- Wed Oct 17, 2012 4:41 pm
- Forum: JavaScript
- Topic: Problem with Javascript
- Replies: 2
- Views: 1695
Re: Problem with Javascript
It seems as if it opens up a clone of the page on top of the page. You should probably look at where you're redirecting / including a page and see if the error lies there.
- Tue Oct 16, 2012 11:25 pm
- Forum: JavaScript
- Topic: Jquery Accordion
- Replies: 4
- Views: 2015
Re: Jquery Accordion
Self solving topics are the best!
- Tue Oct 16, 2012 6:05 pm
- Forum: JavaScript
- Topic: Jquery Accordion
- Replies: 4
- Views: 2015
Re: Jquery Accordion
I'm not sure I understand.
Do you want it closed by default?
Do you want it closed by default?
- Tue Oct 16, 2012 4:30 pm
- Forum: PHP
- Topic: Undefined index on array output
- Replies: 3
- Views: 782
Re: Undefined index on array output
which line is line 14?
- Tue Oct 16, 2012 11:54 am
- Forum: Tutorials
- Topic: User Profiles - Favourites.
- Replies: 1
- Views: 560
Re: User Profiles - Favourites.
I would create a new table for favorites with two columns, one for each user. Sender-id - Reciever-id This would make it easier to remove a particular relation. The queries would be a lot easier too, seeing as you just need a basic Insert query for every new relation, and one Delete query for every ...
- Mon Oct 15, 2012 4:30 pm
- Forum: PHP
- Topic: Array Keys and how do I get them?
- Replies: 6
- Views: 1107
Re: Array Keys and how do I get them?
Works wonders. Thank you ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
- Mon Oct 15, 2012 5:28 am
- Forum: Tutorials
- Topic: PHP Tutorial: Blog(Including commenting)
- Replies: 2
- Views: 682
Re: PHP Tutorial: Blog(Including commenting)
Well, that is NOT an SQL query. It is plain php code.
Post all of your code and I'll take a look at it.
Post all of your code and I'll take a look at it.
- Mon Oct 15, 2012 5:20 am
- Forum: PHP
- Topic: Array Keys and how do I get them?
- Replies: 6
- Views: 1107
Re: Array Keys and how do I get them?
yes. precisely
- Sun Oct 14, 2012 11:32 pm
- Forum: PHP
- Topic: Array Keys and how do I get them?
- Replies: 6
- Views: 1107
Re: Array Keys and how do I get them?
array_keys will return the value of item_id. I want it to go up one level.
- Sun Oct 14, 2012 8:20 pm
- Forum: PHP
- Topic: Array Keys and how do I get them?
- Replies: 6
- Views: 1107
Array Keys and how do I get them?
I have this array setup: [syntax=text] Array ( [cart] => Array ( [0] => Array ( [item_id] => 1 [item_name] => item name [price] => 2 [quantity] => 5 ) [1] => Array ( [item_id] => 3 [item_name] => another item name [price] => 1 [quantity] => 76 ) [2] => Array ( [item_id] => 5 [item_name] => yet anoth...
- Sun Oct 14, 2012 4:35 pm
- Forum: PHP
- Topic: Problem on PHP Tutorial: Automatic Image Gallery tutorial
- Replies: 15
- Views: 2294
Re: Problem on PHP Tutorial: Automatic Image Gallery tutoria
[syntax=php] <?php foreach($images as $image){ if (file_exists("./thumbs{$image}")){ echo "<a href=\"\"><img src=\"images/{$images}\" alt\"{$images}\" /></a>"; }else{ echo "<a href=\"\"><img src=\"?img/{$images}\" alt\"{...