deviant art

Deviant Login Shop  Join deviantART for FREE Take the Tour
[x]
Download Image
GIF, 99×56
more ▶

More from ~Cyberneticneo

Featured in Groups:

Details

May 14, 2007
3.3 KB
99×56
Link
Thumb

Statistics

Comments: 24
Favourites: 55 [who?]

Views: 3,597 (0 today)
Downloads: 166 (0 today)
[x]
:iconcyberneticneo:
a stamp for those php programmers out there

** Edit **

Just want to say thanks to everyone that has fav'ed or added this stamp to their collection :)
Add a Comment:
 
love 1 1 joy 1 1 wow 0 0 mad 0 0 sad 0 0 fear 0 0 neutral 0 0
:iconali-alnoaimy:
~Dynazio or die is too useful ..
great pic and code ...
Reply
:icondynazio:
Nice stamp, faved. Lets process this comment....

<?php
// Connect to db
mysql_connect("localhost","cg_db34132539","p$495f51&58*41");
mysql_select_db("cg_core"); // Select DB
// Process comment
$comment = "$_POST['comment'];";
// Send to the db
$query = "INSERT INTO comments (id, comment) VALUES ('{$comments, id}' )";
mysql_query($query);
mysql_close(0);
// This php script took me only 65 seconds to type, so expect alot of errors
?>
Reply
:iconixeriox:
Error on line 8: Unknown variable. ;)
Reply
:iconnaan21:
you are inserting the comment into the id column, and id should be $id or something, or if it is auto-incrementing, you need not the id at all.

=P
Reply
:iconneocepheus:
<?php
$comment = "Nice"
$question = "How do you use it"
print = $comments + ". " + $question + "."
?>
Reply
:iconixeriox:
Isn't that Java? Um.. PHP uses periods. Not plus significations. code should be..

<?php
$comment = 'Nice';
$question = 'How do you use it?';
print($comment.'. - '.$question.'.');
?>

output:
Nice. - How do you use it?
Reply
:iconpageviews4pointshere:
copy the thumb code into your journal~
Reply
:iconkael-seleill-nulaad:
$my_stamps = Array();
$my_stamps[] = $_GET['this_stamp'];
Reply
:icongheib1:
$query = "INSERT INTO funny (id, comment) VALUES (0, '{$_POST['Kael_Comment']}' )";
mysql_query($query);
mysql_close(0);
Reply
:iconphp:
Mood: Love ~php Nov 13, 2008   Photographer
yay!
thanks for doing a stamp for my username
Reply
Add a Comment: