Did you actually put echo mysql_error(); after your query?
It should have given you different error.
Search found 789 matches
- Fri Feb 03, 2012 11:35 pm
- Forum: Tutorials
- Topic: Register and Login, mysql_result argument error
- Replies: 8
- Views: 1065
- Fri Feb 03, 2012 11:04 pm
- Forum: PHP
- Topic: Replace values in array.
- Replies: 13
- Views: 1168
Replace values in array.
Here I am again! Let's get right into it; I have this array [syntax=php] Array ( [0] => Array ( [url] => Home [name] => Home ) [1] => Array ( [url] => About [name] => About ) [2] => Array ( [url] => contact.php [name] => Contact ) )[/syntax] And this is how I output it, [syntax=php] foreach ($naviga...
- Fri Feb 03, 2012 1:17 am
- Forum: PHP
- Topic: Execute PHP with file_get_contents
- Replies: 5
- Views: 1016
Re: Execute PHP with file_get_contents
Alright, I see what you mean. Since I already grabbed the content from the database and placed it in an array all I had to do was echo it out in the template and remove the unnecessary stuff I had before This is definitively a better way of doing it, don't know why I never thought of doing it like t...
- Fri Feb 03, 2012 1:04 am
- Forum: PHP
- Topic: Execute PHP with file_get_contents
- Replies: 5
- Views: 1016
Re: Execute PHP with file_get_contents
jacek wrote:If you replaced you {things} with $t['things'] and included the template files instead of processing their contents it would be a lot faster and involve a lot less messing about.
That does seem like a good idea... I just don't know how I would set that up.
- Tue Jan 31, 2012 10:55 pm
- Forum: General Chat
- Topic: I just...
- Replies: 11
- Views: 1750
Re: I just...
I wish I could...not debug stuff... Just leave it and it would magically work, or at least not spend several hours on it ![Laughing :lol:](./images/smilies/icon_lol.gif)
![Laughing :lol:](./images/smilies/icon_lol.gif)
- Tue Jan 31, 2012 8:34 pm
- Forum: PHP
- Topic: Execute PHP with file_get_contents
- Replies: 5
- Views: 1016
Execute PHP with file_get_contents
Long story short, I replace certain "items" in a template.php file with information gathered from a DB. [syntax=php] $HEADER = file_get_contents(HEADER); $MAIN = file_get_contents(MAIN); $FOOTER = file_get_contents(FOOTER); echo str_replace($array_items, $merged, $HEADER); echo str_replace...
- Tue Jan 31, 2012 7:40 pm
- Forum: PHP
- Topic: in_array problem
- Replies: 3
- Views: 382
Re: in_array problem
I'm using the fetch_array function from the MySQL class,
[syntax=php]
public function fetch_array(){
$results = array();
while ($this->fetch($row)){
$results[] = $row;
}
return $results;
}
[/syntax]
[syntax=php]
public function fetch_array(){
$results = array();
while ($this->fetch($row)){
$results[] = $row;
}
return $results;
}
[/syntax]
- Tue Jan 31, 2012 6:30 pm
- Forum: General Chat
- Topic: Immortality
- Replies: 12
- Views: 1996
Re: Immortality
jacek wrote:EcazS wrote:I wanna know how we solve things
We won't, we'll kill ourselves.
That's one way to solve it
- Sun Jan 29, 2012 6:19 pm
- Forum: PHP
- Topic: in_array problem
- Replies: 3
- Views: 382
in_array problem
Alright, so while working with a "client" he wanted the option to create static pages instead of being limited by dynamic pages; so I thought I would be good to implement static pages within my CMS so I did, I just have one problem right now with my init.inc file. [syntax=php] $main = new ...
- Sat Jan 28, 2012 11:59 pm
- Forum: General Chat
- Topic: Immortality
- Replies: 12
- Views: 1996
Re: Immortality
Nah, ever since I was able to think "logically" I've always wanted to know what was going to happen with humanity. I mean, we're killing out planet. I wanna know how we solve things
- Sat Jan 28, 2012 9:07 am
- Forum: General Chat
- Topic: I just...
- Replies: 11
- Views: 1750
Re: I just...
Yep! That was the issue!
- Sat Jan 28, 2012 3:14 am
- Forum: General Chat
- Topic: I just...
- Replies: 11
- Views: 1750
I just...
I just spent three hours trying to fix a form issue. Basically I have two forms, one to create a static page and one to create a dynamic page; I create the dynamic page form first and then simply copied the code and made the static page form but when I submitted the static form I didn't get any erro...
- Thu Jan 26, 2012 4:48 pm
- Forum: General Chat
- Topic: Immortality
- Replies: 12
- Views: 1996
Re: Immortality
But they need water. The water over there is very, very bad.
- Thu Jan 26, 2012 2:04 pm
- Forum: General Chat
- Topic: Immortality
- Replies: 12
- Views: 1996
Re: Immortality
That's true but it's also part of a the problem, I read somewhere that if we did manage to get food out to the countries in need that we would burn out our resources quite fast. Finding an efficient means of transport would also be a good thing to invest into, I know they already are but still. I do...
- Thu Jan 26, 2012 4:10 am
- Forum: General Chat
- Topic: Immortality
- Replies: 12
- Views: 1996
Re: Immortality
I think we should focus on more important things as of now. If by other things you mean the population issue and water/food issues then I honestly think the opposite, sort off. I've always thought that maybe if we spent more research on stem cells, learning more about the universe (space) and thing...
- Thu Jan 26, 2012 2:24 am
- Forum: General Chat
- Topic: Immortality
- Replies: 12
- Views: 1996
Immortality
This is quite old but in case you haven't read it then please read this and then come back to discuss! m m It seems incredible far-fetched and even stupid to me that we humans would ever be immortal but at the same time this man as predicted so much to come in our technology and he's been right ever...
- Tue Jan 24, 2012 10:43 pm
- Forum: General Chat
- Topic: Amusing Video
- Replies: 6
- Views: 1231
Re: Amusing Video
"wat.mov"
This video is no longer available due to a copyright claim by Destroy All Software LLC.
SOPA!
- Sat Jan 21, 2012 8:32 pm
- Forum: General Chat
- Topic: Protect IP / SOPA
- Replies: 22
- Views: 3697
Re: Protect IP / SOPA
It used to look like the MegaUpload site. Still don't think it's "true".
- Fri Jan 20, 2012 11:35 pm
- Forum: General Chat
- Topic: Protect IP / SOPA
- Replies: 22
- Views: 3697
Re: Protect IP / SOPA
JelvinJS7 wrote:well, if we used new ISPs, hypothetically speaking we could bypass the censorship.
Nope, if SOPA passes they can force every ISP to block access to certain sites, every ISP in the US that is, that's one thing that wont affect every other country!
- Thu Jan 19, 2012 2:46 pm
- Forum: General Chat
- Topic: Protect IP / SOPA
- Replies: 22
- Views: 3697
Re: Protect IP / SOPA
Why wouldn't we non-americans be concerned? If this goes through they would censor Google, YouTube, Facebook, Twitter, Reddit and so on. Unless all of those sites creates a standard that is only available for american IPs, which we both know they wont do.
- Wed Jan 18, 2012 1:58 pm
- Forum: General Chat
- Topic: Protect IP / SOPA
- Replies: 22
- Views: 3697
Re: Protect IP / SOPA
I really hope this doesn't go through. Every modern country will have a major setback in their economy. I even think our technology will have a setback. I read somewhere on a blog that the bill didn't even make sense. In one instance they referred domains to piracy. I'm serious, they said domains we...