-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
well if javascript is disabled then your need to refesh the page, so the next page would be the confirmation page..!
-
[SOLVED] Question about retrieving other page sources.
MadTechie replied to TheRsMonkey's topic in PHP Coding Help
read up on curl or sockets.. are you trying to login that way ? sorry no example.. sounds like scrapping to me! could be spam! -
[SOLVED] refreshing a section without reloading
MadTechie replied to ohdang888's topic in PHP Coding Help
or an iframe/frame, again need more info -
this doesn't look right to me ($line[1] == crypt ($_POST['password'], $line[1]) ) shouldn't it be ($line[1] == crypt ($_POST['password']) ) or ($line[1] == crypt ($_POST['password'], $line[0]) )
-
The Email will need to encode the file.. so sending packets while the upload is in progress will not work correctly anyway !! its not a limit of php its a how email attachments works, even if you used perl or cgi to support the upload, your still have problems talking to the mail server.... You can upload the but instead of moving the file from the tmp storage area, you could just encode it, and add that to the email.. the file itself can then be deleted, and the email will still contain the file for downloading.. EDIT: oh and as a side note.. PHP CAN send one packet at a time.. ie sockets
-
Yes, you should also see the "force download" snipplet http://www.phpfreaks.com/forums/index.php/topic,95433.0.html
-
I think his asking how to park a domain, not monitor it ..
-
how to pass header information without cURL when requesting a webpage
MadTechie replied to dsaba's topic in PHP Coding Help
use sockets <?php $connection = fsockopen ("www.phpfreaks.com", 80); if ($connection) { fwrite($connection, "HEAD / HTTP/1.1\r\nHOST: www.phpfreaks.com\r\n\r\n"); } ?> -
your use imap_fetchbody, ie $fileContent = imap_fetchbody($msgbox,$msgno,$file+2);
-
I think you need Perl to do that .. or ateast exec/system, not really a PHP thing.. i could be wrong!
-
passing a genereted ol to a mailer form in a hidden field
MadTechie replied to pquery's topic in PHP Coding Help
this seams to be a CSS/HTML problem not a PHP one -
Okay, i'm kinda confused can you post an example of the text you have and the text you want it to be ie i have the quick brown fox jumped over the lazy red dog and want it to be the quick brown fox Sat On the lazy red dog
-
<?php $message = "badword1 test badword2"; $black_list = array('badword1','badword2','badword3'); $message = str_replace($black_list,'#!@%*#',$message); echo $message; ?> $black_list not $blacklist also you need to return the result from str_replace
-
like this <?php //if $_GET["action"] = addginseng01 then $result will = ginseng $result = ""; if (preg_match('/add([^\d]*)/i', $_GET["action"], $result)) { $result = $result[1]; // = ginseng } echo $result; ?> EDIT: You could also use, IF the word may contain numbers if (preg_match('/add(.*?)\d{2,2}/i', $_GET["action"], $result))
-
<?php //include 'connect.php'; //commented out as i can't see why you need this $action = $_SERVER['PHP_SELF']; $submit = $_POST['submit']; if(isset($_POST['submit'])) { if($_POST['username'] == "admin" && $_POST['password'] == "admin") { echo "granted"; $_SESSION['loggedIn'] = "yes"; header('Location: tracker.php'); } else { echo "denied"; } } echo "<form action=\"$action\" method=\"post\">"; echo "Username: <input name=\"username\" type=\"text\" size=\"25\" /><br/><br/>"; echo "Password: <input name=\"password\" type=\"password\" size=\"25\" /><br/><br/>"; echo "<input name=\"submit\" type=\"submit\" value=\"Submit\" />"; echo "</form>"; ?>
-
Best place for info is the manual http://dev.mysql.com/doc/refman/5.0/en/join.html BUT heres a few examples http://www.keithjbrown.co.uk/vworks/mysql/mysql_p5.php i wrote a little test script, to try out <?php function Test() { $query = "SELECT * FROM products_description LEFT JOIN products on products.products_id = products_description.products_id ORDER BY products.products_date_added ASC"; while ($row = mysql_fetch_assoc($result)) { $pd_array = $row; } mysql_free_result($result); return $pd_array; } $tester = Test(); print_r($tester); die; ?>
-
Erm.. What the ..... I started to tidy it up but the code doesn't make much sense..
-
He is returning it Anywhere else will end the loop!
-
without out seeing the whole code i would guess your running both queries on the same connection link.. So.. when the query in the loop is called it replaces the query at the start of the loop.. you could use 2 connections but i think it would be better to use a JOIN.. something like this $query = "SELECT * FROM products LEFT JOIN products_description as PB on PB.ID = products.ID ORDER BY products.products_date_added ASC";
-
your code doesn't make logical sense.. IE.. What are you expecting to happen here ? <?php unset($_SESSION['rand']); $pokemonrand2= $_SESSION['rand']; ?> also what makes you think its randomizing twice ? maybe explain what you expecting to happen..
-
maybe removing the 2nd random function would help $Action= $_GET['action']; $Result1= mysql_query("SELECT * FROM pokemon_info WHERE user_id='$ID'"); $Rows1= mysql_fetch_array($Result1); $PokemonRand= rand(1, 99); //<-- This one
-
what about somethingk like this <?php $col_keys = mysql_query("SELECT * FROM $mysqltbl"); $key = array(); $values = array(); while($csv_keys = mysql_fetch_field($col_keys)) { if ($_POST["$csv_keys->name"] > "") { $key[] = $_POST["$csv_keys->name"]; } } $keys = implode(",",$key); $feed = fopen($CSV_File, 'r'); while ($data = fgetcsv ($feed, 10000, ",")) { $values = implode(",",$data); mysql_query("INSERT INTO $mysqltbl ( $keys, temp ) VALUES ( $values, 'temp' )"); } ?> Well your allowing any smarty pants to execute anything they want on your system just think they can unlink anyfile for example
-
Kinda messy way of doing things.. but without attempting to make sense of it.. what are you trying to do ? import an CSV using dynamic field names!
-
lol, i should of noticed.. try changing to <?php $mySQL = mysql_query("SELECT signupid,name,gamename,sn,email,pass,position,info,time,ip FROM apply")or die(mysql_error()); while ($apps = mysql_fetch_assoc($mySQL)){ ?>