-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
Cool ok will remember that.
-
[SOLVED] Parse error: parse error, unexpected T_STRING
MadTechie replied to aaronk7's topic in PHP Coding Help
your need to post some more code at my code looks fine.. unless you added the <?php and ?> -
[SOLVED] How can i change the Maximum Execution Time?
MadTechie replied to fekaduw's topic in PHP Coding Help
you may want to post some code as if its taking longer than 30 seconds its possible you have a neverending loop or something <?php set_time_limit(0); ini_set('max_execution_time',60000); ?> -
Its the same idea just add another Join they can be a pain when you start but oh so powerful
-
[SOLVED] Parse error: parse error, unexpected T_STRING
MadTechie replied to aaronk7's topic in PHP Coding Help
try <?php $sql1 = $_GET['game']; $sqltogether = "g_".$sql1; $sql = "select * from $sqltogether where team = '1'"; $query = mysql_query($sql); while( $row = mysql_fetch_array($query) ) { echo $row['player']; } ?> -
Normally i would point you to mssql.com but your using MSSQL so try this
-
[SOLVED] Warning: mysql_num_rows(): not valid?
MadTechie replied to samus's topic in PHP Coding Help
change <?php echo '$item'; echo '$calories'; echo '$discription'; ?> to <?php echo "item:$item<br>calories:$calories<br>discription:$discription"; ?> Doh too slow; -
try this <?php function forceDownload($archiveName) { $headerInfo = ''; // Security checks if( $archiveName == "" ) { echo "<html><title>PDF - Download </title><body><BR><B>ERROR:</B> The download file was NOT SPECIFIED.</body></html>"; exit; } elseif ( ! file_exists( $archiveName ) ) { echo "<html><title>PDF - Download </title><body><BR><B>ERROR:</B> File not found.</body></html>"; exit; } header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: application/pdf"); header("Content-Disposition: attachment; filename=".basename($archiveName).";" ); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($archiveName)); readfile("$archiveName"); } WARNING: nothing must be printed to the script before headers, also DOUBLE check the file your downloading this will download anything you point it to.. so it might be woth checking the type is PDF Note: i know this is a php script but it might help :/
-
Yeah true.. kinda forgot about that!
-
[SOLVED] Warning: mysql_num_rows(): not valid?
MadTechie replied to samus's topic in PHP Coding Help
you may want to add the ; on line $search = $_REQUEST['search'] so $search = $_REQUEST['search']; -
How do we report spammers like Tatoo i have been PMing Mods but i'm sure they are sick of that..
-
[SOLVED] Warning: mysql_num_rows(): not valid?
MadTechie replied to samus's topic in PHP Coding Help
try $search = addslashes($search); //Added after Frosts comment $query ="SELECT * FROM search WHERE item LIKE '%$search%' OR calories LIKE '%$search%' OR discription LIKE '%$search%'"; EDIT: Oh more like remove the @ is only hide the error nothing more -
OK that will take me a while plus without the database to test each step.. i really suggect you do some research! SELECT nPivotStatisticalMonitorTypeToDeviceID FROM PivotStatisticalMonitorTypeToDevice AS PSMTTD LEFT JOIN Device as nDID ON ( nDID.nDeviceID = PSMTTD.nDeviceID AND nDeviceTypeID = '3') WHERE sDisplayName = '$Device_Name[$key]' AND nStatisticalMonitorTypeID = '1'"
-
Basically you need to learn JOINs.. i'll review your code a little more see if i can write one
-
LOL Opps i omitted the % not + use ^[^*+]+$ <php WHERE (src='3000' OR src='3001' OR src='3002' OR dst='3000' OR dst='3001' OR dst='3002') AND ((dst REGEXP '^[^*+]+$') AND (src REGEXP '^[^*+]+$')) ?>
-
try <?php WHERE (src='3000' OR src='3001' OR src='3002' OR dst='3000' OR dst='3001' OR dst='3002') AND ((dst REGEXP '^[^*%]+$') AND (src REGEXP '^[^*%]+$')) php?> UPDATED: above
-
try this. it may releave something change <?php rename("../../UserFiles/Image/layouts/$imagename" , "../../UserFiles/Image/layouts/$renjpg"); ?> to <?php $fFrom = "../../UserFiles/Image/layouts/$imagename"; $fTo = "../../UserFiles/Image/layouts/$renjpg"; echo "from: $fFrom<br>to: $fTo"; rename($fFrom , $fTo); ?> post the from: and to: on the results that fail (also one what that works) it also could be directory structor
-
explode input then add them on by on with spaces
MadTechie replied to HAVOCWIZARD's topic in PHP Coding Help
whart are you trying to do.. ? your breaking into words then what! -
your searching for none of which contain + or * so why add the ? you could use AND (dst REGEXP (^[^*%]+$)) AND (src REGEXP (^[^*%]+$))
-
the manual examples
-
inserting image url into mysql in a while loop
MadTechie replied to eZe616's topic in PHP Coding Help
Use update!!.. i don't understand -
<?php unlink($file); //delete a file ?>
-
isn't going to plan is hardly a description of a problem!
-
basically <?php require_once "class_sql_inject.php"; $sql = new sql_inject('./sqlinject.log'); $sRQ = $_POST['name']; if($sql->test($sRQ)) { echo "USE the data"; }else{ echo "don't use the data"; } ?>