Photoshop Contest PhotoshopContest.com
Creative Contests. Real Prizes. Essential Resource.
You are not logged in. Log in or Register

 


Photoshop Contest Forum Index - General Discussion - PHP coding - Reply to topic

Goto page Previous  1, 2, 3, 4

PHP or ColdFusion?

ColdFusion

20%

20%

[ 2 ]

PHP

80%

80%

[ 8 ]

Total Votes: 10

splodge

Location: Yorkshire,

Post Tue Mar 06, 2007 9:55 am   Reply with quote         


panic over, the computer needed more than reboots, it needed a good nights rest, now i gotta learn how to use it Crying or Very sad




_________________


Hallcross Toots
supak0ma

Location: Photoshop Nation

Post Tue Mar 06, 2007 12:20 pm   Reply with quote         






splodge

Location: Yorkshire,

Post Thu Mar 08, 2007 12:46 pm   Reply with quote         


is this a good thing or a bad thing, the service was shut down at the time?





_________________


Hallcross Toots
FootFungas

Location: East Coast!

Post Thu Mar 08, 2007 1:40 pm   Reply with quote         


I'm trying to insert data into MySQL tables through PHP, but its not working.
Anyone know why?
It seems to connect fine, I dont get any error messages.
Using This Tutorial

Apache 2.2
PHP 5.2
MySQL 5.0




supak0ma

Location: Photoshop Nation

Post Fri Mar 09, 2007 4:48 am   Reply with quote         


pls post the code




splodge

Location: Yorkshire,

Post Fri Mar 09, 2007 8:33 am   Reply with quote         


WTF (nothing to do with .PHP) every time i click on a link i get a blank page and this popup, click on "OK" and i get to the link,





_________________


Hallcross Toots
FootFungas

Location: East Coast!

Post Fri Mar 09, 2007 9:01 am   Reply with quote         


php wrote:
<?php
$con = mysql_connect("localhost","root","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("my_db", $con);

mysql_query("INSERT INTO userdata (Username, Password, Location)
VALUES ('guest', 'password', 'US')");

mysql_close($con);
?>

I don't get any errors, it just doesnt insert the values.




supak0ma

Location: Photoshop Nation

Post Fri Mar 09, 2007 10:04 am   Reply with quote         


FootFungas wrote:
php wrote:
<?php
$con = mysql_connect("localhost","root","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("my_db", $con);

mysql_query("INSERT INTO userdata (Username, Password, Location)
VALUES ('guest', 'password', 'US')");

mysql_close($con);
?>

I don't get any errors, it just doesnt insert the values.


try this

$qr=mysql_query("INSERT INTO userdata (Username, Password, Location) VALUES ('guest', 'password', 'US')") or die(mysql_error());

if you don't put that die() clause mysql will fail silently. See if it gives you an error, should work tho.

one more thing, i find that insert syntax very tedious, try using:

$qr=mysql_query("INSERT INTO userdata SET Username='guest', Password='password', Location='US'") or die(mysql_error());




couldb5150

Location: California & Idaho

Post Fri Mar 09, 2007 10:56 am   Reply with quote         


im an idiot and think php is the level of acidity in pool water....bwahahahahah

and cold fusion sounds like something ya get at dairy queen (the ice cream franchise) sorry no help here


signed ...
the idiot !


bwahahahahahah
but i got a million of em !!!




_________________

supak0ma

Location: Photoshop Nation

Post Fri Mar 09, 2007 11:01 am   Reply with quote         


ehehehhe 5150, one thing i can tell you, don't go for a windows server.




couldb5150

Location: California & Idaho

Post Fri Mar 09, 2007 11:03 am   Reply with quote         


supak0ma wrote:
ehehehhe 5150, one thing i can tell you, don't go for a windows server.


10 4 ...THANKS !!!!



THATS ONE I OWE YA !!!LOL


5150




_________________

Goto page Previous  1, 2, 3, 4

Photoshop Contest Forum Index - General Discussion - PHP coding - Reply to topic

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Navigate PSC
Contests open  completed  winners  prizes  events  rules  rss 
Galleries votes  authentic  skillful  funny  creative  theme  winners 
Interact register  log in/out  forum  chat  user lookup  contact 
Stats monthly leaders  hall of fame  record holders 
PSC advantage  news (rss)  faq  about  links  contact  home 
Help faq  search  new users  tutorials  contact  password 

Adobe, the Adobe logo, Adobe Photoshop, Creative Suite and Illustrator are registered trademarks of Adobe Systems Incorporated.
Text and images copyright © 2000-2006 Photoshop Contest. All rights reserved.
A venture of ExpertRating.com