-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
you could use ini_set('sendmail_from', 'my@account');
-
Yeah see examples posted!!.. its not hard.. infact most would say its kinda simple!
-
<?php $data = "hello you bad1, how the bad2"; $Bad= array("bad1", "bad2", "bad3"); $Replace = array("***", "***", "***"); $data = str_ireplace($Bad, $Replace, $data); ?> If you want advanced (more flexable) filtering then RegEx would be better, but a little slower RegEx would probably be my choice, as you can catch things which would noramlly require a few lines use any other method simple RegEx Example <?php $data = 'hello you bad1, how the bad2'; $patterns[] = '/bad1/i'; $replacements[] = '***'; $patterns[] = '/bad2/i'; $replacements[] = '***'; $patterns[] = '/f??k/i'; $replacements[] = '***'; $data = preg_replace($patterns, $replacements, $data); ?> That will be more complex and much slower..
-
probably using http://uk2.php.net/highlight-string and http://uk2.php.net/manual/en/function.substr-compare.php
-
What is the Difference Between $_POST, $_GET, and $_REQUEST?
MadTechie replied to lotrfan's topic in PHP Coding Help
example <?php echo "Data=".$_GET['data']; echo "<br>"; echo "ID=".$_GET['id']; $newid = ($_GET['id'] + 1); echo "<a href='example1.php?id=$newid&data=test'>test</a>"; ?> -
[SOLVED] Help! I've Made A Dumb Mistake But I Don't Know How!
MadTechie replied to lotrfan's topic in PHP Coding Help
you can use any, i just had that installed on this machine, their are better but i got used to this another good one for 90% of text editing is Notepad++ (google it) -
What is the Difference Between $_POST, $_GET, and $_REQUEST?
MadTechie replied to lotrfan's topic in PHP Coding Help
$_POST = POST Requests (normally from a form) $_GET= Get Requests (from the URL) or a form $_REQUEST Either Get or Post Requests -
[SOLVED] Help! I've Made A Dumb Mistake But I Don't Know How!
MadTechie replied to lotrfan's topic in PHP Coding Help
LOL, thats sounds too much like work to me, i copied the code in Dreamweaver, then done a find all on {, in the list i reviewed the line, (to check if any were commented out) this also gave me the total number, i then did the same for the } -
Wrong section.. try HTML/CSS section or the pointless section
-
erm.. like this echo $o[0]; other example <?php echo '<script language="javascript">alert("test");</script>'; ?>
-
i think your missing a comma (,) teng84
-
[SOLVED] Advice needed about creating a php chat room!
MadTechie replied to npsari's topic in PHP Coding Help
ajax on a timer would work -
the code should be <?php if ($trade['item1'] != "0"){ $item1 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item1']}")); $r_item_array1 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item1['itemid']}")); } if ($trade['item2'] != "0"){ $item2 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item2']}")); $r_item_array2 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item2['itemid']}")); } if ($trade['item3'] != "0"){ $item3 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item3']}")); $r_item_array3 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item3['itemid']}")); } if ($trade['item4'] != "0"){ $item4 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item4']}")); $r_item_array4 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item4['itemid']}")); } if ($trade['item5'] != "0"){ $item5 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item5']}")); $r_item_array5 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item5['itemid']}")); } if ($trade['item6'] != "0"){ $item6 = mysql_fetch_array(mysql_query("SELECT * FROM `useritems` WHERE `id`={$trade['item6']}")); $r_item_array6 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`={$item6['itemid']}")); } ?>
-
can you re-post the updated first code, also is ID a char or an int ?
-
change <?php $r_item_array1 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`='$item1[itemid]'")); ?> to <?php $r_item_array1 = mysql_fetch_array(mysql_query("SELECT * FROM `items` WHERE `id`='{$item1['itemid']}'")); ?> on all items
-
[SOLVED] Help! I've Made A Dumb Mistake But I Don't Know How!
MadTechie replied to lotrfan's topic in PHP Coding Help
the logic (mainly the if statements) if you can find values that work and values that do not work.. then you can workout the problem.. currently we need more info, to workout the problem, i suggest looking closely at the input.. -
remove the :'s
-
remove the user folder, and try my script again
-
But PayPal has an API, for this... i am so suspicious, because i am the one after you... Muahahha (just kidding) i'm not suspicious, i am just trying to understand the problem..
-
It will return the data from that form.. so you could do this $html= curl_exec($ch); echo $html; i think the big question is why your taking this route!
-
the basic concept is this (note the //heres) <?php //FIELD HERE $post_data = array( "url" => "http://pn-network.net/sprites/tc_012_2.png", "fileupload" => "http://pn-network.net/sprites/tc_012_2.png", "MAX_FILE_SIZE" => "13145728", "refer" => "", "brand" => "", ); $ch = curl_init();//OF COURSE curl_setopt($ch, CURLOPT_URL, "http://www.imageshack.us/transload.php"); //HERE curl_setopt($ch, CURLOPT_MAXREDIRS, 10); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_POST, true); //HERE curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); //HERE curl_exec($ch);//OF COURSE curl_close($ch);//OF COURSE ?>
-
one of a few http://www.phpfreaks.com/forums/index.php/topic,161386.0.html
-
2 ways, 1. read CURL documentation 2. search the forum (i have written the script on here before).
-
LOL, Can you click topic solved please (bottom left)