Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. the error was because of this quote the reason for the was its quicker to say echo taith than a) repeat what you said b) quicker than typing agree's with taith yeah what taith said did you even attempt what taith said c) its shorter that typing print(taith); LOL
  2. echo taith also what "error"
  3. Ermmm..? Sighs, i guess this //Prepare the name $shout = trim($shout); $shout = stripslashes($shout); $shout = str_replace ("\n", " ", $shout); $shout = str_replace ("\r", " ", $shout); $shout = str_replace ("\r", " ", $shout); $shout = wordwrap($shout, 100, "<br />"); //added
  4. whats wrong with wordwrap <?php $text = "The quick brown fox jumped over the lazy dog."; $newtext = wordwrap($text, 20, "<br />\n"); echo $newtext; ?> <?php /** * function wordCut($sText, $iMaxLength, $sMessage) * * + cuts an wordt after $iMaxLength characters * * @param string $sText the text to cut * @param integer $iMaxLength the text's maximum length * @param string $sMessage piece of text which is added to the cut text, e.g. '...read more' * * @returns string **/ function wordCut($sText, $iMaxLength, $sMessage) { if (strlen($sText) > $iMaxLength) { $sString = wordwrap($sText, ($iMaxLength-strlen($sMessage)), '[cut]', 1); $asExplodedString = explode('[cut]', $sString); echo $sCutText = $asExplodedString[0]; $sReturn = $sCutText.$sMessage; } else { $sReturn = $sText; } return $sReturn; } ?>
  5. iif is probably your own function use <?php echo ($_type=="today")?$_SUPP["language"]["dashtoday"]:$_SUPP["language"]["dashnewstitle"]; ?>
  6. use fread but it depends how their redirecting.. the HTML files should be read ok if the php file is redirecting your probably need to read from local source
  7. heehee replace all '<?=' with '<?php echo ' then replace all '<? ' with '<?php ' then replace all '<?phpphp ' with '<?php ' (do this twice just in case) LOL i hate using short tags
  8. $_GET['products_id'] this forum is full of threads about post and get
  9. 1. Common Gateway Interface 2. Hypertext Transfer Protocol 3. File Transfer Protocol 4. input code (DM formats in pretty syntax) for more info STFW..www.google.com
  10. html issule NOT a php one could be JS i know IE playsaround when padding is used
  11. help with what ? i didn't see any problems!
  12. Rar is currently available through PECL RAR you need pecl rar installed on the server download and
  13. move <?php mysql_connect($host,$user,$password) or die("Failed to connect"); mysql_select_db($db) or die("Falied to select database"); $sql = "SELECT * FROM $table ORDER BY id ASC;"; $result = mysql_query($sql); if ($result){ while ($myrow = mysql_fetch_array($result)){ //echo "<tr><td>$myrow[id]<td>$myrow[Address]<td> $myrow[City]<td>$myrow[Fax]<td>$myrow[specialization]<td>$myrow[TargetSalary]<td>$myrow[JobType]<td>$myrow[WillingToRelocate]"; echo "<tr><td>$myrow[id]></td></tr>"; "<tr><td>$myrow[Address]</td></tr>"; "<tr><td>$myrow[City]</td></tr>"; "<tr><td>$myrow[Fax]</td></tr>"; "<tr><td>$myrow[specialization]</td></tr>"; "<tr><td>$myrow[TargetSalary]</td></tr>"; "<tr><td>$myrow[JobType]</td></tr>"; "<tr><td>$myrow[WillingToRelocate]</td></tr>"; }} else { echo "mysql Error: " . mysql_error(); } ?> to the top..
  14. -> is just the way you handle classes.. the reason i posted how to read is because your need to read in the mail and then send it out.. i don't know of another way to forward them (direct from php).. if not pop3 then maybe imap.. if you have imap support <?php phpinfo(); ?> you could just read the IMAP section <?php $server = "domain.com"; $user = "mad"; $pass = "techie"; $conn = @imap_open("\{$server/imap}INBOX", $user, $pass)or die("Connection to server failed"); $headers = @imap_headers($conn) or die("Couldn't get emails"); $numEmails = sizeof($headers); echo "You have $numEmails in your mailbox"; for($i = 1; $i < $numEmails+1; $i++) { $mailHeader = @imap_headerinfo($conn, $i); $from = $mailHeader->fromaddress; $subject = strip_tags($mailHeader->subject); $date = $mailHeader->date; echo "Email from $from, subject $subject, date $date<br>"; $body = nl2br(strip_tags(imap_body($conn, $i))); echo "$body<br>"; } imap_close($conn); ?> hope this helps (was ripped from an old project)
  15. server ip set to new server ?
  16. WTF.. use FTP or chown.. detail helps.... again WTF
  17. did you move the database over as well ? are the username and password correct ? what about user name prefixes (if used) was it updated ?
  18. 1st open the page with pagename.php?id=id pagename being the file name and id being the id number 2nd replace $row[address]; with <?=$row['address'];?> in the HTML Code: section NB: use the same idea as address for City ie $myrow[City] to <?=$row['City'];?>
  19. without more compleate info/code i can't say $name & $sid aren't being set.. i have no idea what means
  20. Note thats assumes $_SESSION['User_Name'] = something like user = 'username' etc maybe $query = "SELECT * FROM business_info where user='".$_SESSION['User_Name']."' AND pass='".$_SESSION['Password']."'" ; OR (i find this easier to read) $query = "SELECT * FROM business_info where user='{$_SESSION['User_Name']}' AND pass='{$_SESSION['Password']}'" ; of course change user & pass to the correct field names
  21. no differents really i just try not to use short_open_tag as it can be turned off and then the code fails to parser php.ini short_open_tag
  22. i agree on all except the <?= personally i use <?php echo $row['address']; ?> personal preference i guess
  23. something else to think about.. i am guessing your windows.. and assuming the host is linux.. so be warned.. "../Connections/conn.php" isn the same as "../connections/conn.php" other than that your need to check your folder structor is the same. connect to the site via FTP and compare the folders..
  24. welcome please click solved (bottom left)
  25. Coughts array starts at $i=1;
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.