-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
try $body = "Hi, ".$_POST['First'].", ".$_POST['Last']." has requested access to the Database. ".$_POST['Email'];
-
play with the timeout see what happens but slow servers will seam to have closed ports when their just slow! $timeout = 30; //change this $fp = fsockopen($host, $current, $errno, $errstr, $timeout);
-
scanning all ports will always be slow!, you could shorten the timeout but then you could get some bad results
-
define('HOURS_DIFFERENCE', 6*3600); date("H:i", time()+HOURS_DIFFERENCE); EDIT: jesirose beat me (but it's her code, lol)
-
[SOLVED] Need help with Check for invaild usernames!
MadTechie replied to Simon180's topic in PHP Coding Help
Can you click solved bottom left (ps welcome to the board) -
replace while($row = mysql_fetch_array($result)) { echo "<img src=http://www.myroho.com/images/".$info['photo'] ."> <br>"; echo "<b>Article:</b> ".$info['Article'] . "<br> "; echo "<b>Email:</b> ".$info['Email'] . " <br>"; echo "<b>Abstract:</b> ".$info['Abstract'] . " <hr>"; } with while($row = mysql_fetch_array($result)) { echo "<img src=http://www.myroho.com/images/".$row['photo'] ."> <br>"; echo "<b>Article:</b> ".$row['Article'] . "<br> "; echo "<b>Email:</b> ".$row['Email'] . " <br>"; echo "<b>Abstract:</b> ".$row['Abstract'] . " <hr>"; }
-
if you have it your see a section like so open phpinfo(); and do a find for "imagick"
-
first what are you trying to do? if your scrapping the videos then you need an agreement with google. if thats agreed then you could use file_get_contents(); to pull the file in
-
[SOLVED] Need help with Check for invaild usernames!
MadTechie replied to Simon180's topic in PHP Coding Help
updated to fit $badwords = array('thorpe', 'Daniel0', 'pie'); $badword = implode("|", $badwords); $UsernameGood = true; if (eregi($badword, $usernamefield)) { $UsernameGood = false; } // checks for invalid characters in username if ($UsernameGood == false && $UsernameCheck == true) { die('The username is invalid because of reserved, or disallowed words.'); } -
[SOLVED] Need help with Check for invaild usernames!
MadTechie replied to Simon180's topic in PHP Coding Help
try $badwords = "pie|toe|cake|thorpe"; if (eregi($badwords, $username)) { exit("bad word"); } -
OK if its a string i *think* your trying to do this $sql = "SELECT * FROM items WHERE country='" . mysql_real_escape_string($_POST['menuFilesDMA']) . "' AND type='" . mysql_real_escape_string($_POST['Type']) . "' AND Abstract LIKE '%$keyword%'";
-
Urgent code help needed - auto email not working
MadTechie replied to PorkPie's topic in PHP Coding Help
These are questions... your replies are usless.. Q: 1. does it email (check junk/spam) A: 1. The code was all working before I added the // Send e-voucher email to customer So thats a NO ? maybe ? Q: 20000. Can you try the suggections A: 20000. Beefcake -
Make all database rows lowercase with a capital
MadTechie replied to eits's topic in PHP Coding Help
no SQL statements to update them with that!.. your need to create a script that loop throught each record and update it. basic idea 1. connection #1, select * 2. loop though each records (start) 3. $data = ucwords(strtolower($c1row['data'])); 4. connection #2 update table set data='$data' where ID={$c1row['id']} 5. end loop sorry (i'm at work so had to be quick ) -
Urgent code help needed - auto email not working
MadTechie replied to PorkPie's topic in PHP Coding Help
1. does it email (check junk/spam) 2. any errors (did you comment out the ob_start()'s 3. are your email server details correct ? 4. try echoing some date ie $_REQUEST['contemail'] $aff $_SESSION['bookingid'] we need details worst case add die("TEST"); at the start then test you get t he message TEST, move it down until you stop getting it, the line before is probably the problem! -
why not read in the file and then overwrite with the updated data ?
-
check the manual fwrite
-
Urgent code help needed - auto email not working
MadTechie replied to PorkPie's topic in PHP Coding Help
Oh thats usful... i give TechieOut -
OK what is $keyword ? a string or an array ? do a var_dump($keyword); see what it displays as for the 2nd error change $result = mysql_query($query); to $result = mysql_query($sql);
-
Make all database rows lowercase with a capital
MadTechie replied to eits's topic in PHP Coding Help
use ucfirst ucfirst(strtolower("BOBBYS BITS AND PIECES")); -
from $sql = "SELECT * FROM items WHERE country='" . mysql_real_escape_string($_POST['menuFilesDMA']=) . "' AND type='" . mysql_real_escape_string($_POST['Type']=) . "' AND Abstract LIKE '%" . implode('%', $keyword) . "%'"; // why the ='s ? to $sql = "SELECT * FROM items WHERE country='" . mysql_real_escape_string($_POST['menuFilesDMA']) . "' AND type='" . mysql_real_escape_string($_POST['Type']) . "' AND Abstract LIKE '%" . implode('%', $keyword) . "%'";
-
Urgent code help needed - auto email not working
MadTechie replied to PorkPie's topic in PHP Coding Help
also comment out the ob_start();'s for testing you may get an error about the header but then you know its getting their! -
have you tried <?php $pagetitle="Contact"; include("jecgardner/breadcrumb.php"); ?> or <?php $pagetitle="Contact"; include("breadcrumb.php"); ?>
-
http://manual.cakephp.org/
-
"failed to open stream" check the includes exist! also your including remote files, this maybe disabled
-
why do you have the ='s and } ? see comments $sql = "SELECT * FROM items WHERE country='" . mysql_real_escape_string($_POST['menuFilesDMA']=) . "' AND type='" . mysql_real_escape_string($_POST['Type']=) . "' AND Abstract LIKE '%" . implode('%', $keyword) . "%'"; // why the ='s ? } //<-- whats this for ?