jakebur01
Members-
Posts
885 -
Joined
-
Last visited
Everything posted by jakebur01
-
could i do this? Or is their a more appealing way? like a table format? $tmp .= $myrow["isbn"].' '; $tmp .= $myrow["quantity"].'<br />';
-
Here's what i'm trying to do with it. I want the rows to go in this e-mail message: $message = "<h2>My Company Order # $coolid </h2> <br /> <h3>Shipping Information</h3><br />$shipname<br />$shipaddress<br />$shipcity<br />$shipstate<br />$shipzip<br />$shipcountry<br /><h3>Items Ordered</h3><br /><table border=1 width=500><tr><td><b>Item</b></td><td><b>Quantity</b></td></tr><tr><td>ITEMS GO IN THIS COLUMN</td><td>QUANITY NUMBERS GO IN THIS COLUMN</td></tr></table><br />"; where i have "ITEMS GO IN THIS COLUMN" i want $myrow['isbn'] where i have "QUANITY NUMBERS GO IN THIS COLUMN" i want $myrow['quantity'] the while ($myrow = mysql_fetch_array($result)) is further up in the script. This mail script is at the bottom. I just need that table with the items and quantities in my mail message.
-
would it be something like this? and call $rowvalue later/ $query = "SELECT * FROM order_items WHERE orderid = '$coolid'"; $result = mysql_query($query, $db) or die(mysql_error()); while ($row = mysql_fetch_assoc($result)) { $rows[] = $row; } $i = 1; foreach($rows as $rowid => $rowarray) { //echo "<b>---- Row $rowid ----</b><br />\n\n"; foreach($rowarray as $rowfield => $rowvalue) { // echo " $rowfield = $rowvalue<br />\n"; echo " $rowvalue"; } } echo "<br />";
-
How could I store the rows from this into something to where I could retrieve it later? Like if I wanted to store these rows into an email message. echo "<TABLE align=center width=650 BORDER=1 CELLSPACING=0 CELLPADDING=5>"; while ($myrow = mysql_fetch_array($result)) { echo"<tr><TD WIDTH=160 align=center>"; //echo "<a href=\"maptest.php?id=".$myrow[id]."&productselect=".$productselect."&dname=".$dname."&displayimage=".$displayimage."&dealerinfo=".$dealerinfo."\"><img //src='../Images/globe.gif'/></a>"; //echo"</td><TD WIDTH=120><small>"; echo$myrow["orderid"]; echo"</td><TD WIDTH=160 align=center>"; echo$myrow["isbn"]; echo"</td><TD WIDTH=160 align=center>"; echo$myrow["item_price"]; echo"</td><TD WIDTH=160 align=center>"; echo$myrow["quantity"]; $testingsamicans = $myrow['isbn']; $testingsamicans2 = $myrow['quantity']; //echo"</small></td><TD WIDTH=30><small>"; //echo$myrow["Zip"]; //echo"</small></td><TD WIDTH=80><small>"; ///echo$myrow["Phone"]; //echo"</small></td><TD WIDTH=10><small>"; //echo $value; echo"</td>"; //echo "Zip code <b>$key</b> is <b>$value</b> miles away from <b>97214</b>.<br />"; //$dealerinfo = " You are $value miles away from this $dname dealer."; echo"</tr>"; } echo "</table>";
-
i want to put this (below) into the $message = " "; of my e-mail : echo "<TABLE align=center width=650 BORDER=1 CELLSPACING=0 CELLPADDING=5>"; while ($myrow = mysql_fetch_array($result)) { echo"<tr><TD WIDTH=160 align=center>"; //echo "<a href=\"maptest.php?id=".$myrow[id]."&productselect=".$productselect."&dname=".$dname."&displayimage=".$displayimage."&dealerinfo=".$dealerinfo."\"><img //src='../Images/globe.gif'/></a>"; //echo"</td><TD WIDTH=120><small>"; echo$myrow["orderid"]; echo"</td><TD WIDTH=160 align=center>"; echo$myrow["isbn"]; echo"</td><TD WIDTH=160 align=center>"; echo$myrow["item_price"]; echo"</td><TD WIDTH=160 align=center>"; echo$myrow["quantity"]; //echo"</small></td><TD WIDTH=30><small>"; //echo$myrow["Zip"]; //echo"</small></td><TD WIDTH=80><small>"; ///echo$myrow["Phone"]; //echo"</small></td><TD WIDTH=10><small>"; //echo $value; echo"</td>"; //echo "Zip code <b>$key</b> is <b>$value</b> miles away from <b>97214</b>.<br />"; //$dealerinfo = " You are $value miles away from this $dname dealer."; echo"</tr>"; } echo "</table>"; How could I put the rows from this into the body of my mail?
-
thanks.
-
Thats awesome. How do I now make this variable active? $a->add_field('x_first_name', '$name'); all I get with this is $name rather than John. Should I use double quotes?
-
I have a variable $name for example which holds two words " John Smith " . Is there any way to break this name into two variables? Example: $firstname = John $lastname = Smith ?
-
Thank you!
-
I am setting the body for my mail script. But, I get this error: PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING $message = "Hello $name, this e-mail is to confirm that we have received your order. Your order number is $ordernumber . <br /> display_cart($_SESSION['cart'], false, 0) <br /> display_shipping(calculate_shipping_cost()) <br /> We will process your credit card soon, if approved we will proceed with your order. You will receive an e-mail when your card is processed. <br />Thank you, <br />Me <br /> http://mysite.com"; How should this be?
-
Does anyone know of any tutorial or script to go by that is similar to myspace?
-
Wouldn't I need to do a " fputs() for it?
-
What would be the best way to add a Bcc into this? $smtpConnect = fsockopen($smtpServer, $port, $errno, $errstr, $timeout); //echo $errstr." - ".$errno; $smtpResponse = fgets($smtpConnect, 4096); if(empty($smtpConnect)) { $output = "Failed to connect: $smtpResponse"; //echo $output; return $output; } else { $logArray['connection'] = "Connected to: $smtpResponse"; echo "E-Mail Sent Successfully<br><p />Please check your junk mail or spam mail folder if you do not receive an e-mail in your inbox.<br><p />"; } //you have to say HELO again after TLS is started fputs($smtpConnect, "HELO $localhost". $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['heloresponse2'] = "$smtpResponse"; //request for auth login fputs($smtpConnect,"AUTH LOGIN" . $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['authrequest'] = "$smtpResponse"; //send the username fputs($smtpConnect, base64_encode($username) . $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['authusername'] = "$smtpResponse"; //send the password fputs($smtpConnect, base64_encode($password) . $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['authpassword'] = "$smtpResponse"; //email from fputs($smtpConnect, "MAIL FROM: <$from>" . $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['mailfromresponse'] = "$smtpResponse"; //email to fputs($smtpConnect, "RCPT TO: <$to>" . $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['mailtoresponse'] = "$smtpResponse"; //the email fputs($smtpConnect, "DATA" . $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['data1response'] = "$smtpResponse"; //construct headers $headers = "MIME-Version: 1.0" . $newLine; $headers .= "Content-type: text/html; charset=iso-8859-1" . $newLine; $headers .= "To: $nameto <$to>" . $newLine; $headers .= "From: $namefrom <$from>" . $newLine; //observe the . after the newline, it signals the end of message fputs($smtpConnect, "To: $to\r\nFrom: $from\r\nSubject: $subject\r\n$headers\r\n\r\n$message\r\n.\r\n"); $smtpResponse = fgets($smtpConnect, 4096); $logArray['data2response'] = "$smtpResponse"; // say goodbye fputs($smtpConnect,"QUIT" . $newLine); $smtpResponse = fgets($smtpConnect, 4096); $logArray['quitresponse'] = "$smtpResponse"; $logArray['quitcode'] = substr($smtpResponse,0,3); fclose($smtpConnect); //a return value of 221 in $retVal["quitcode"] is a success return($logArray); Also, is their anything I might could add into this to keep it from going into a junk mail folder? I'm pretty happy with it, it goes to most all e-mails i've tested with it. I just wish I could add in the bcc.
-
fixed it by adding this curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
-
I am trying to set up transactions to the authoize.net payment gateway. After running a test transaction I get this error back: Error with Transaction: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed I do not have an SSL umbrella over this page. Is their anything I could put in my code that might would overive this?
-
What does it mean to index the columns?
-
It's pulling from a large table.
-
Is their any way I could speed this up to where it will display a lot faster? $db = mysql_connect("localhost", "", ""); mysql_select_db("jhearnsberger", $db); $result = mysql_query("SELECT isbn, description, title, author FROM books "); // WHERE catid <> 'TBP' while($myrow = mysql_fetch_array($result)) { $catid = $myrow['isbn']; $title = $myrow['isbn'].' '.$myrow['description'].' '.$myrow['title'].' '.$myrow['author']; $url = "show_book.php?isbn=$catid"; //echo "<small>"; //echo $myrow['isbn'].' '.$myrow['description'].' '.$myrow['title'].' '.$myrow['author']; ?> <a href="<?php echo $url; ?>"><?php echo $title; ?></a><br />
-
What would be a good things I could add on to this script so that yahoo, hotmail, and others are not as likely to detect my e-mails as spam and that would give it authentication? Thanks, Jake <?php $to = '[email protected]'; $subject = 'follow up'; $message = 'hello'; $headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?>
-
Hey, I put a field on my homepage for users to be able to type in two or three word phrases and products will display simalar results. Here is my current code: $conn = db_connect(); $sql = "SELECT * FROM books "; $sql .= "WHERE `No` LIKE '%$mysearch%' "; $sql .= "OR `description` LIKE '%$mysearch%' "; $sql .= "OR `title` LIKE '%$mysearch%' "; $sql .= "OR `author` LIKE '%$mysearch%' "; $sql .= "OR `isbn` LIKE '%$mysearch%' "; Is their something I might could use in place of this that might would be a little more leniant? This code above is a little to strict.
-
Nope. Just a large table.
-
Hey, My host has a maximum execution time of 15 seconds set. I keep getting a PHP Fatal error: Fatal error: Maximum execution time of 15 seconds exceeded Is their anything I can put in my code that will over ride this? It is so agrivating. Thank you, Jake
-
Anybody? I'm using windows servers.
-
Hey, I have always had trouble with my mail scripts. They only work with addresses on my server. Does anyone have any code of a script that is almost guaranteed to work with most all e-mail addresses? `Jake
-
So I won't have session id's attached to all my category and product links. I can solve this by just not doing session_start() on the homepage , but then my cart quanity and cart amount at the top of the page will all equal zero. So thats why I am wanting to keep the session for the top half and not have the session for the bottom half.