HOME | DD

Published: 2007-05-14 15:17:06 +0000 UTC; Views: 5053; Favourites: 51; Downloads: 175
Redirect to original
Description
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
Related content
Comments: 40
SquidCannonArmed [2020-12-14 01:44:36 +0000 UTC]
π: 0 β©: 0
Phrozenbit [2014-04-01 02:28:53 +0000 UTC]
class SendComment Β {
private $Comment; $MySQL ;
const MySQLHost = "localhost" ;
const MySQLBase = "DAdbase" ;
const MySQLUser = "phrozenbit" ;
const MySQLPass = "somerandompassword" ;
Β function __construct($comment) { Β
Β if($this->MySQL = mysqli_connect(SendComment::MySQLHost,Β SendComment::MySQLUser,Β SendComment::MySQLPass,Β SendComment::MySQLBase)) { Β
Β Β
Β Β if(isset($comment))) {
Β Β $this->Comment = mysqli_real_escape_string($this->MySQL, $comment) ;
Β Β $q = "INSERT INTO `comments` (`username`, `comment`, `date`) VALUES ( 'Phrozenbit', '".$this->comment."', NOW() )" ; Β Β Β
Β Β $r = mysqli_query($this->MySQL, $q) or die ( mysqli_error($this->MySQL) ); Β Β
Β Β } Β
Β }
Β }
}
$SendComment = new SendComment("Thanks ^^, I'm using this stamp on my profile, and spent 5 minutes coding this to show why ^^, and why an I the only one coding Object oriented PHP5?") ;
?>
π: 0 β©: 1
ali-alnoaimy [2012-04-04 20:24:24 +0000 UTC]
~Dynazio or die is too useful ..
great pic and code ...
π: 0 β©: 0
Dynazio [2010-12-10 01:57:24 +0000 UTC]
Nice stamp, faved. Lets process this comment....
// 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
?>
π: 0 β©: 2
iXeriox In reply to Dynazio [2012-09-23 10:18:09 +0000 UTC]
Error on line 8: Unknown variable.
π: 0 β©: 0
naan21 In reply to Dynazio [2011-12-14 08:09:38 +0000 UTC]
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.
π: 0 β©: 0
NeoCepheus [2009-03-01 04:15:03 +0000 UTC]
$comment = "Nice"
$question = "How do you use it"
print = $comments + ". " + $question + "."
?>
π: 0 β©: 2
iXeriox In reply to NeoCepheus [2012-09-23 10:21:55 +0000 UTC]
Isn't that Java? Um.. PHP uses periods. Not plus significations. code should be..
$comment = 'Nice';
$question = 'How do you use it?';
print($comment.'. - '.$question.'.');
?>
output:
Nice. - How do you use it?
π: 0 β©: 1
RuizBr In reply to iXeriox [2013-08-26 22:41:31 +0000 UTC]
Indeed, you are right.. but couldn't you show it like this?
print($comment.'. - '.$question);
I think that if you do it like thisΒ
print($comment.'. - '.$question.'.');
You will have a dot in the end of your string...
Nice. - How do you use it?.
correct me if I'm wrong ^^
π: 0 β©: 1
RuizBr In reply to iXeriox [2013-08-29 22:01:55 +0000 UTC]
Do you program for much time? I was wondering if I could work in other countries too...
π: 0 β©: 1
iXeriox In reply to RuizBr [2013-09-05 22:34:59 +0000 UTC]
Commonly PHP. Though I do know a little of Perl, Python and JQuery. Learning as I go along.
π: 0 β©: 1
RuizBr In reply to iXeriox [2013-09-07 01:21:58 +0000 UTC]
I edited a bot in Python once...
I work mostly with PHP and Jquery, but I do also work with ajax, javascript, css, html, sql and wordpress. ^^
π: 0 β©: 1
iXeriox In reply to RuizBr [2013-09-11 01:10:00 +0000 UTC]
That's great, Perhaps you could become an asset to the website I'm coding right now.
π: 0 β©: 1
RuizBr In reply to iXeriox [2013-09-12 01:45:55 +0000 UTC]
Oh? That would be nice, if you got any problem just send me a message friend!
π: 0 β©: 0
Pageviews4pointshere In reply to NeoCepheus [2011-07-16 17:12:10 +0000 UTC]
copy the thumb code into your journal~
π: 0 β©: 0
Kael-Seleill-Nulaad [2008-11-26 02:09:11 +0000 UTC]
$my_stamps = Array();
$my_stamps[] = $_GET['this_stamp'];
π: 0 β©: 1
gheib1 In reply to Kael-Seleill-Nulaad [2009-02-17 16:07:01 +0000 UTC]
$query = "INSERT INTO funny (id, comment) VALUES (0, '{$_POST['Kael_Comment']}' )";
mysql_query($query);
mysql_close(0);
π: 0 β©: 0
Jellyka [2008-05-31 21:48:57 +0000 UTC]
if($subscription){
$mood = 'happy';
echo 'I\'m using it !'
}
else{
$mood = 'sad';
echo 'I want it T_T';
}
//Yeah, I need a sub ! xD
?>
π: 0 β©: 1
Cyberneticneo In reply to Jellyka [2008-06-01 01:43:52 +0000 UTC]
$st[] = "cool";
$st[] = "finally";
$st[] = "a";
$st[] = "reply";
$st[] = "in";
$st[] = "PHP!!";
while ($loop < count($st))
{
}
π: 0 β©: 1
Cyberneticneo In reply to Cyberneticneo [2008-06-01 01:44:52 +0000 UTC]
damn..whered that edit button go <_<
$st[] = "cool";
$st[] = "finally";
$st[] = "a";
$st[] = "reply";
$st[] = "in";
$st[] = "PHP!!";
$loop=0;
while ($loop < count($st))
{
echo $st[$loop];
$loop++;
}
π: 0 β©: 1
Jellyka In reply to Cyberneticneo [2008-06-01 12:51:07 +0000 UTC]
mysql_connect("localhost","Jellyka","awake");
mysql_select_db("brain"); //First, connect to my brain that early in the morning
$intelligence = 5;
$reponse = mysql_query("SELECT Sentence FROM thoughts WHERE intelligence>'".$intelligence."' AND English='yes' DESC LIMIT 0,1")or die(mysql_error());
$donnees = mysql_fetch_array($reponse);
echo $donnees['Sentence'];
?>
π: 0 β©: 2
Cyberneticneo In reply to Jellyka [2008-06-02 23:58:03 +0000 UTC]
hahaha, i like thay one XD you got some pretty good graphics skills too by the looks of it...thats one thing i could never get the hang of
π: 0 β©: 1
Jellyka In reply to Cyberneticneo [2008-06-03 19:28:56 +0000 UTC]
Thanks
And thank you for the watch ^_^
π: 0 β©: 0
Jellyka In reply to Jellyka [2008-06-01 12:53:42 +0000 UTC]
ERROR at line 5: Table 'Sentence' can't be found that early in the morning. Especially in English. Especially with an intelligence that high.
Please, read your version's manual......
π: 0 β©: 0
falexx [2007-06-19 05:32:23 +0000 UTC]
hey, i'll use this stamp in my journal.
if it's not okey please write me a note and i'll remove it!
π: 0 β©: 1
Cyberneticneo In reply to falexx [2007-06-19 09:13:26 +0000 UTC]
feel free, thats what its there for
π: 0 β©: 0
Kael-Seleill-Nulaad In reply to Cyberneticneo [2008-11-26 02:08:13 +0000 UTC]
include(AWESOME);
GD library ftw
π: 0 β©: 0