Jump to content

cfgcjm

Members
  • Posts

    137
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cfgcjm's Achievements

Member

Member (2/5)

0

Reputation

  1. my site is laid out as follows: beta.domain.com/index.html <-- this page contains an ajax form scripts.domain.com/js/formoperations.js <--ajax javascript scripts.domain.com/php/msgsend.php <--ajax php script The PHP script which is posted below is to echo back "Thank you" once the form is processed & emailed. If the files are in the directories stated above the PHP script does not echo back. It still completes emailing the form data successfully but does the echo does not make it back to beta.domain/index.html. HOWEVER...if I move my PHP file to beta.domain.com/msgsend.php it works flawlessly. Why can't my script echo across subdomains? Thanks! <?php $fname= urldecode($_GET['param']); $lname = urldecode($_GET['param1']); $email = urldecode($_GET['param2']); $details = urldecode($_GET['param3']); $datereported = date(n."/".j."/".Y." @ ".g.":".i." ".A); $text="<p><b>First Name:</b> ".$fname."</p><p><b>Last Name:</b> ".$lname."</p><p><b>Email Address:</b> ".$email."</p><p><b>Message:</b> ".$details."</p>-End Submission"; $plaintext="First Name: ".$fname."\nLast Name: ".$lname."\nEmail Address: ".$email."\nMessage: ".$details."\n\n End Submission"; $to = 'chris@domain.com'; $subject = 'Web Message'; $random_hash = md5(date('r', time())); $headers = "From: Web Message\r\nReply-To: info@domain.com"; $headers .= "\r\nContent-Type: text/html; charset='iso-8859-1' Content-Transfer-Encoding: 7bit"; ob_start(); ?> <img src="http://uniformimgs.domain.com/emailheadcontact.gif" alt="" /> <p style="font-family:Arial, Helvetica, sans-serif; font-size:12px; margin:15px 0 50px 0;"><?php echo $fname.' '.$lname; ?> has submitted a message from the website on <?php echo $datereported; ?>.</p> <?php echo $text; ?> <? $message = ob_get_clean(); if(mail($to, $subject, $message, $headers)) { echo '<h4>Thanks for your message '.$fname.'!</h4><br/><br/><br/><br/>'; $to = $email; $subject = 'Thanks for your message!'; $random_hash = md5(date('r', time())); $headers = "From: info@domain.com\r\nReply-To: info@domain.com"; $headers .= "\r\nContent-Type: text/html; charset='iso-8859-1' Content-Transfer-Encoding: 7bit"; ob_start(); ?> <img src="http://uniformimgs.domain.com/emailheadcontact.gif" alt="" /> <p style="font-family:Arial, Helvetica, sans-serif; font-size:12px; margin:15px 0 5px 0;">Dear <?PHP echo $fname ?>,</p> <p style="font-family:Arial, Helvetica, sans-serif; font-size:12px; margin:0;">Thank you for sending us a message from our website; we love hearing from you folks! If needed, we'll contact you as soon as possible in regards to your message.</p> <p style="font-family:Arial, Helvetica, sans-serif; font-size:12px; margin:20px 0 0 200px;">Sincerely,</p> <p style="margin: 10px 0 0 200px;"><img src="http://uniformimgs.domain.com/briansig.gif" alt="" /></p> <p style="font-family:Arial, Helvetica, sans-serif; font-size:10px; margin:0px 0 0 200px;">John R Smith, pricipal</p> <p style="font-family:Arial, Helvetica, sans-serif; font-size:10px; margin:200px 0 0 0">This email has been sent by an automated service</p> <? $message = ob_get_clean(); //send the email mail($to, $subject, $message, $headers); } else { echo "<h5>Oops! Seems like we have a problem.</h5><h6>Please try again later or call XXX-XX-XXX.</h6>"; } ?>
  2. I got it! The second dimension in the array seemed to be screwing it up. I went back into it and completely removed the second dimension from existence. Now i've got 5-A*6-B**7-A*7-B*8-A* which is correct.
  3. Changed it to sort($homerooms[0]); $cleanhr=array_unique($homerooms[0]); echo $cleanhr[0][0]; echo"*"; echo $cleanhr[1][0]; echo"*"; echo $cleanhr[2][0]; echo"*"; echo $cleanhr[3][0]; echo"*"; echo $cleanhr[4][0]; echo"*"; echo $cleanhr[5][0]; echo"*"; echo $cleanhr[6][0]; and it now gave me "6******"...odd
  4. That posted strange Array ( [0] => Array ( [0] => 5-A ) [1] => Array ( [0] => 6-B ) [2] => Array ( [0] => 6-B ) [3] => Array ( [0] => 7-A ) [4] => Array ( [0] => 7-B ) [5] => Array ( [0] => 8-A ) )
  5. Array ( [0] => Array ( [0] => 5-A ) [1] => Array ( [0] => 6-B ) [2] => Array ( [0] => 6-B ) [3] => Array ( [0] => 7-A ) [4] => Array ( [0] => 7-B ) [5] => Array ( [0] => 8-A ) ) and you're right it is coded as multi-dimensional however only one dimension is being used
  6. I've passed data into an array (and i've triple checked to make sure it is in there) and i'm trying to remove the duplicates. The echo is "5-A******" which is incorrect. It should be "5-A*6-B*7-A*7-B*8-A" Diagnosis welcome... My code is as follows: sort($homerooms); $cleanhr=array_unique($homerooms); echo $cleanhr[0][0]; echo"*"; echo $cleanhr[1][0]; echo"*"; echo $cleanhr[2][0]; echo"*"; echo $cleanhr[3][0]; echo"*"; echo $cleanhr[4][0]; echo"*"; echo $cleanhr[5][0]; echo"*"; echo $cleanhr[6][0];
  7. I've had this problem before and just left it go however now i have no choice but to deal with it. I have a select box: <select name="hr" id="hr" class="fieldhr" onchange="wipebutton();"> <option></option> <option>5-A</option> <option>5-B</option> <option>6-A</option> <option>6-B</option> <option>7-A</option> <option>7-B</option> </select> And I need to change some of it's css properties. I've tried external, internal, and inline CSS and the only properties that will change in IE are height and width. Any changes made to the border, font-size, paddings, etc. show in FF but not IE (7+). Any idea why...and how to fix this?
  8. yeah it wasn't the query that was a problem, must have been the other syntax i had it within, or so it seems
  9. ShaunO: That did work. So is ShaunO's example the faster way to do it as prescribed by Crayon?
  10. I got it...nvm...i needed the "mysql_num_rows" function <?PHP require_once "powerdb/connect.php"; session_start(); $id = $_SESSION['id']; $sql = "SELECT * FROM carttemp WHERE session_id='$id'"; $result = mysql_query($sql); echo mysql_num_rows($result); ?>
  11. I'm having some trouble coming up with the right syntax for this what i'm trying to do is count the rows of a table where the field "session_id" is equal to a variable ex: (but wrong) "SELECT COUNT(*) FROM carttemp WHERE session_id = '$id';
  12. either way...it works now, thanks!
  13. I'm trying to check if a session is started and no matter what, each time it echos:"session just started" <?PHP if(!isset($_SESSION)) { session_start(); echo'session just started'; } else{ echo'session already started'; } ?>
×
×
  • 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.