-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
it doesn't say that! it basically says Integers over 2,147,483,647 become floats.. but reviewing your code in don't see any integer based problems!
-
this may help http://uk3.php.net/manual/en/language.types.integer.php see Integer overflow section
-
why would $_POST[$qf] work ? its a get not a post !
-
update multiple checkboxes? DELETE and INSERT INTO?
MadTechie replied to jarv's topic in PHP Coding Help
add some debugging ie $sql1 = "INSERT INTO keyword (keyword_id,HeaderID) Values ('$keyword_id','$HeaderID')"; echo $sql1; //debug code -
i guess you could do something like <?php session_start(); if(!empty($_POST['cap']) && !empty($_SESSION['Who']) && $_post['cap'] == $_SESSION['Who']) { echo "WOOHOOO CORRECT"; } //Yes i know i could just append .jpg to the key. $input = array("Neo" => "neo.jpg", "Morpheus" => "morpheus.jpg", "Trinity" => "Trinity.jpg", "Cypher" => "Cypher.jpg", "Tank"=> "Tank.jpg"); $Who = array_rand($input); $WhoImg = $input[$Who]; $_SESSION['Who'] = $Who; echo "<img src=\"$randImg\">"; ?> Who is that ? <form method="post"> <input type="text" value="cap"> <input type="submit"> </form>
-
multipart email weirdness ... did i do this right?
MadTechie replied to theinfamousmielie's topic in PHP Coding Help
the only thing i could suggest if create a small test email.. start at the minimum and build up until you find the cause.. maybe add extra lines to everything.. as SpamAssassin is open source it can be a pain to get support for -
update multiple checkboxes? DELETE and INSERT INTO?
MadTechie replied to jarv's topic in PHP Coding Help
What do you mean doesn't work ?! -
your missing session_start(); at the start of the script.. also, captcha should create the images using GD, and not used static images
-
multipart email weirdness ... did i do this right?
MadTechie replied to theinfamousmielie's topic in PHP Coding Help
oops /n/r should be \n\r -
what was the question ?
-
[SOLVED] Parse error: syntax error, unexpected '{' on line 204
MadTechie replied to justinjkiss's topic in PHP Coding Help
it should be bottom left, if its not there just post SOLVED.. new problem outside of the code you have posted .. then probably best to start a new thread.. the better the description the better the help -
[SOLVED] UpDate MySql from a form (ANOTHER PROBLEM!)
MadTechie replied to TheStalker's topic in PHP Coding Help
change $sql=("UPDATE customers SET Surname = '$_POST[surname]', Forename = '$_POST[forename]', AddressLine1 = '$_POST[addressLine1]', AddressLine2 = '$_POST[addressLine2]', Postcode = '$_POST[postcode]' WHERE Surname ='$_POST[customerID]'"); to $sql= "UPDATE customers SET Surname = '{$_POST['surname']}', Forename = '{$_POST['forename']}', AddressLine1 = '{$_POST['addressLine1']}', AddressLine2 = '{$_POST['addressLine2']}', Postcode = '{$_POST['postcode']}' WHERE Surname ='{$_POST['customerID']}' "; echo $sql; //debug code it should atleast print "UPDATE customers SET Surname =" to the page.. if it works you can remove "echo $sql; //debug code" -
[SOLVED] Parse error: syntax error, unexpected '{' on line 204
MadTechie replied to justinjkiss's topic in PHP Coding Help
it was easy to miss.. missed it myself on the first eye sweep, if this is resolved can you please click topic solved -
multipart email weirdness ... did i do this right?
MadTechie replied to theinfamousmielie's topic in PHP Coding Help
MISSING_MIME_HB_SEP = Missing serperator line between MIME HB (header and body) i normally concat stings.. and don't use heredoc.. maybe try $Mail->Body = <<<EOBODY --AuroraMail-Mixed-{$sep} Content-Type: multipart/alternative; boundary="AuroraMail-Section-{$sep}"/n/r -
use htmlentities(); edit:.. lol all on the same page
-
[SOLVED] Parse error: syntax error, unexpected '{' on line 204
MadTechie replied to justinjkiss's topic in PHP Coding Help
else ($session->logged_in){ ($session->logged_in) is a condition thus requires the if! -
[SOLVED] Parse error: syntax error, unexpected '{' on line 204
MadTechie replied to justinjkiss's topic in PHP Coding Help
shouldn't else ($session->logged_in){ be elseif($session->logged_in){ -
[SOLVED] How to force a string variable parsing?
MadTechie replied to duskshine's topic in PHP Coding Help
I find that using en.php & fr.php works quite well for out-sourcing if you want to move it to a database then create a table like this with 3 fields, Key (general-info), Lang (en), Wording("Hello world") you could create a simple class to rebuild the array using the correct language -
[SOLVED] prefix a primary id with username
MadTechie replied to coolphpdude's topic in PHP Coding Help
click topic solved bottom left.. if its not their just post solved i guess -
[SOLVED] How to force a string variable parsing?
MadTechie replied to duskshine's topic in PHP Coding Help
i thought of variable variables, but thats in only really useful with the variable name not the value.. i think a bigger question is why do you want to do this ? -
[SOLVED] How to force a string variable parsing?
MadTechie replied to duskshine's topic in PHP Coding Help
you mean like this ? $i=1; $str = "$"; $str .= "i"; eval("echo $str;"); EDIT: something i don't recommend! -
you could use fsocket,CURL or simplely file_get_contents heres a starting block (justa google and yahoo search) update $find <?php $URL = array("Google" => "http://www.google.co.uk/search?q=", "Yahoo"=>"http://uk.search.yahoo.com/search?p="); $found = array(); $find = "test"; //get the results foreach($URL as $Engine => $Search) { $found[$Engine] = file_get_contents($Search.$find); } //$found is an array of the results, your need to parse this data into a more friendly results page, //probably best to use a regex to filter the links into an array then merge them and sort and then //build a new page echo "<pre>"; print_r($found); echo "</pre>"; ?> **UNTESTED
-
NA, regex would be faster.. oh you doing this in a database query ? infact never mind
-
[SOLVED] 'file does not exist' error.... but it does
MadTechie replied to forcer's topic in PHP Coding Help
Cool, can you click solved please