-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
[SOLVED] my $_POST won't show up once submited
MadTechie replied to Foser's topic in PHP Coding Help
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 -
[SOLVED] my $_POST won't show up once submited
MadTechie replied to Foser's topic in PHP Coding Help
echo taith also what "error" -
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
-
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; } ?>
-
[SOLVED] PHP 4 to 5 short tag/syntax question...
MadTechie replied to php.nub's topic in PHP Coding Help
iif is probably your own function use <?php echo ($_type=="today")?$_SUPP["language"]["dashtoday"]:$_SUPP["language"]["dashnewstitle"]; ?> -
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
-
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
-
Please HELP a Newbie with passing variables in url
MadTechie replied to boogzilla's topic in PHP Coding Help
$_GET['products_id'] this forum is full of threads about post and get -
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
-
[SOLVED] Why cant I see this text area in IE ??
MadTechie replied to dc_jt's topic in PHP Coding Help
html issule NOT a php one could be JS i know IE playsaround when padding is used -
help with what ? i didn't see any problems!
-
Rar is currently available through PECL RAR you need pecl rar installed on the server download and
-
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..
-
-> 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)
-
server ip set to new server ?
-
need some help setting folder restrictions
MadTechie replied to CSmith1128's topic in PHP Coding Help
WTF.. use FTP or chown.. detail helps.... again WTF -
did you move the database over as well ? are the username and password correct ? what about user name prefixes (if used) was it updated ?
-
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'];?>
-
without more compleate info/code i can't say $name & $sid aren't being set.. i have no idea what means
-
how to do this query i am getting a parser error
MadTechie replied to franknu's topic in PHP Coding Help
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 -
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
-
i agree on all except the <?= personally i use <?php echo $row['address']; ?> personal preference i guess
-
welcome please click solved (bottom left)
-
[SOLVED] passing variables/values out of while block
MadTechie replied to everisk's topic in PHP Coding Help
Coughts array starts at $i=1;