Jump to content

hey_suburbia

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hey_suburbia's Achievements

Member

Member (2/5)

0

Reputation

  1. Sorry about the post above that was regarding a missing ";", this is the error I'm getting: Warning: shuffle() expects parameter 1 to be array, object given in /nfs/c04/h03/mnt/65395/domains/nhsonline.org/html/templates/nhs/glider.php on line 9
  2. Thanks, but when I did this: <?php shuffle($videos) foreach ($videos as $video): $video_count++; if ($video->header=="") $play="true"; else $play="false"; ?> I got this: Parse error: syntax error, unexpected T_FOREACH in /nfs/c04/h03/mnt/65395/domains/nhsonline.org/html/templates/nhs/glider.php on line 10
  3. Here is a snippet of code I have to populate images and use glider.js to power the image viewer, but I need to make each image random... Any thoughts? Code: <?php foreach ($videos as $video): $video_count++; if ($video->header=="") $play="true"; else $play="false"; ?> <div class="video-list-item"> <a href="javascript:switchHeader('<?=$video->text1?>','<?=$video->file?>','<?=$video->header?>','<?=$video->link?>',<?=$play?>,true)"> <img style='float:left;' src="<?=$this->baseurl?>/images/videos/<?=$video->thumbnail?>"> </a> <div class='wrapper'> <h3><a href="javascript:switchHeader('<?=$video->text1?>','<?=$video->file?>','<?=$video->header?>','<?=$video->link?>',<?=$play?>,true)"><?=$video->text1?></a></h3> <p class='black' ><?=$video->text2?></p> <p style='font-weight: normal' class='black' ><?=$video->text3?></p> </div> <a href="javascript:switchHeader('<?=$video->text1?>','<?=$video->file?>','<?=$video->header?>','<?=$video->link?>',<?=$play?>,true)">> VIEW</a> </div> <?php if ($video_count%3==0 && count($videos)!=$video_count) print "</li><li>"; ?> <?php endforeach; ?></li> Site for reference (The images in the yellow bar): http://www.nhsonline.org/
  4. Thanks rajivgonsalves, that was stupid of me... Thanks everyone for helping out! Case closed.
  5. GOT IT TO WORK! <?php $sendTo = $_POST["email"]; $subject = "Check out this Holiday Card I made"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: " . $_POST["name"] ." <" . $_POST["email"] .">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-path: " . $_POST["email"]; $flashVar = $_POST["copycode"]; $message = "<a href=\"{$flashVar}\">View Your Card /a>"; mail($sendTo, $subject, $message, $headers); ?> The only problem now is that the email body shows "View Your Card /a>"
  6. This works: <?php $sendTo = $_POST["email"]; $subject = "Check out this Holiday Card I made"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: " . $_POST["name"] ." <" . $_POST["email"] .">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-path: " . $_POST["email"]; $message = $_POST["copycode"]; mail($sendTo, $subject, $message, $headers); ?> This doesn't work: <?php $sendTo = $_POST["email"]; $subject = "Check out this Holiday Card I made"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: " . $_POST["name"] ." <" . $_POST["email"] .">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-path: " . $_POST["email"]; $flashVar = $_POST["copycode"]; $message = "<a href=\"{$flashVar}\">View Your Card/a>" mail($sendTo, $subject, $message, $headers); ?> For some reason this doesn't work either: <?php $sendTo = $_POST["email"]; $subject = "Check out this Holiday Card I made"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: " . $_POST["name"] ." <" . $_POST["email"] .">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-path: " . $_POST["email"]; $message = "<a href=\"{$message}\">View Your Card/a>" mail($sendTo, $subject, $message, $headers); ?> :'(
  7. Here is what I came up with, but now I'm not receiving anything...?? I think it has something to do with the "$message2" variable that I setup to receive the flash variable "copycode" <?php $sendTo = $_POST["email"]; $subject = "Check out this Holiday Card I made"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: " . $_POST["name"] ." <" . $_POST["email"] .">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-path: " . $_POST["email"]; $message2 = $_POST["copycode"]; $message = "<a href=\"{$message2}\">Your greeting card</a>" mail($sendTo, $subject, $message2, $headers); ?>
  8. Thank You, I shall give it a try and report back!
  9. Hello All. I'm having a bit of a hard time getting something (which I believe is rather simple) to work. Here goes: I have a Flash Holiday card sending a long query URL variable to PHP called "$message". I tested just a simple send mail and everything works perfect: <?php $sendTo = $_POST["email"]; $subject = "Check out this Holiday Card I made"; $headers = "From: " . $_POST["name"] ." <" . $_POST["email"] .">\r\n"; $headers .= "Reply-To: " . $_POST["email"] . "\r\n"; $headers .= "Return-path: " . $_POST["email"]; $message = $_POST["copycode"]; mail($sendTo, $subject, $message, $headers); ?> Currently, the email body receives a VERY long URL. I want to have the long URL hidden from view by just putting it into an HREF. Something like this: <a href="{$message}">Your greeting card</a> I'm pretty sure I'll have to send an html email, which is OK. But I can't get the syntax to work. Can anyone offer advice/samples? THANKS!
  10. I didn't manually install it, I assumed Media Temple had it already. Is this something I can install myself or would I need to call my server and have them do it? http://hallmedia.com/phpinfo.php
  11. I added the following to my .htaccess: AddType application/x-httpd-php .html Now I'm getting prompt to download my html files every time I click on a link rather than going to the link, any advice? Thanks!
  12. Here is the portion in question: <p class="style2" align="center">-----------------------------------------------------------------------</p> <p class="style2" align="center">YOUR PERSONALIZED CARE PLAN -- WAYS TO HELP YOUR CHILD</p> <p class="style1" align="left">Remember, parents should continue to watch for stress reactions for at least the first 6 weeks after their child is injured. To make sure that a child has the best recovery, parents should call their child’s doctor or school counselor IF: </p><ul> <li>A child’s stress reactions go on for more than one month after the injury; or</li> <li>A child’s stress reactions get worse, bother him, or worry his parent(s); or</li> <li> A child’s stress reactions get in the way of his physical recovery. </li> </ul> <p class="style1" align="center">Here are the tips you chose based on your ratings of your child's reactions and your concerns.<br> We encourage <strong>you</strong> to come back to the website as needed to explore other care tips</p> <br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br> <br><br> <table align="center" border="0" cellpadding="5" cellspacing="5"> <tbody><tr><th colspan="2"><div align="center">How to help with Re-experiencing: Reliving what happened</div></th></tr> <tr><th ,="" colspan="2" bgcolor="#d3d3d3">TIPS</th></tr><tr><td ,="" colspan="2" bgcolor="#e6e6e6"><ul><li>Notice when your child is feeling worried or lost in their thoughts - and ask what's on their mind.</li></ul></td></tr><tr><td ,="" colspan="2" bgcolor="#e6e6e6"><ul><li>Listen when your child wants to talk.</li></ul></td></tr><tr><td ,="" colspan="2" bgcolor="#e6e6e6"><ul><li>If your child has questions about his/ her injury, treatment, or any other parts of what happened, try to answer simply and honestly.</li></ul></td></tr><tr><td ,="" colspan="2" bgcolor="#e6e6e6"><ul><li>Help your child deal with overwhelming or troubling thoughts by learning how to 'take a break' from them at times - do something fun, spend time with friends, get busy with other activities.</li></ul></td></tr><tr><td ,="" colspan="2" bgcolor="#e6e6e6"><ul><li>Notice your own feelings. Are there times when you don't want to talk with your child about what happened - because it's upsetting to you? If so, be sure to reach out to family and friends to get support for yourself.</li></ul></td></tr>
  13. When this runs and I view the source code I get about 30 random <BR> tags that leave a giant gap in the middle of the code. I get the <br> tags before this line: <p align="center" class="style2">-----------------------------------------------------------------------</p> <p align="center" class="style2">YOUR PERSONALIZED CARE PLAN -- WAYS TO HELP YOUR CHILD</p> Full code: <table border="0" align="center" cellpadding="5px" cellspacing="5px"> <!-- ---------------------- RE_EXPERIENCING ---------------------- --> <tr><th colspan="2"><div align="center">Re-experiencing: Reliving what happened</div></th></tr> <?php $counter = 1; $bgcolor = ""; include("reactionInfo.php"); $reactionInfoObject = new reactionInfo($_SESSION["step1b_POST"]); if($counter >= 1){ foreach($reactionInfoObject->reexperienceBArray as $reexperienceObj){ $counter++; if (($counter % 2) == 0){ $bgcolor="#e6e6e6"; }else{ $bgcolor="#d3d3d3"; } echo("<tr> <td bgcolor='" . $bgcolor . "' width='370px'> <div align='left' class='tablePad'>" . $reexperienceObj[0] . "</div> </td> <td bgcolor='" . $bgcolor . "' width='220px'> <div align='left' class='tablePad'>" . $reexperienceObj[1] . "</div> </td> </tr>"); } } ?> <!-- ---------------------- AVOIDANCE ---------------------- --> <tr><th colspan="2"><div align="center">Avoidance: Staying away from reminders</div></th></tr> <?php $counter = 1; $bgcolor = ""; if($counter >= 1){ foreach($reactionInfoObject->avoidanceBArray as $avoidanceObj){ $counter++; if(($counter % 2) == 0){ $bgcolor="#e6e6e6"; }else{ $bgcolor="#d3d3d3"; } echo("<tr> <td bgcolor='" . $bgcolor . "' width='370px'> <div align='left' class='tablePad'>" . $avoidanceObj[0] . "</div> </td> <td bgcolor='" . $bgcolor . "' width='220px'> <div align='left' class='tablePad'>" . $avoidanceObj[1] . "</div> </td> </tr>"); } } ?> <!-- ---------------------- Hyper-arousal ---------------------- --> <tr><th colspan="2"><div align="center" class='noSymptomsPad'>Hyper-arousal: Feeling anxious or jumpy</div></th></tr> <?php $counter = 1; $bgcolor = ""; if($counter >= 1){ foreach($reactionInfoObject->hyperBArray as $hyperObj){ $counter++; if(($counter % 2) == 0){ $bgcolor="#e6e6e6"; }else{ $bgcolor="#d3d3d3"; } echo("<tr> <td bgcolor='" . $bgcolor . "' width='370px'><div align='left'>" . $hyperObj[0] . "</div></td> <td bgcolor='" . $bgcolor . "' width='220px'><div align='left'>" . $hyperObj[1] . "</div></td> </tr>"); } } ?> <!-- ---------------------- Other Concerns ---------------------- --> <tr><th colspan="2"><div align="center">Other concerns</div></th></tr> <?php $counter = 1; $bgcolor = ""; if($counter >= 1){ foreach($reactionInfoObject->concernsBArray as $concernsObj){ $counter++; if(($counter % 2) == 0){ $bgcolor="#e6e6e6"; }else{ $bgcolor="#d3d3d3"; } echo("<tr> <td bgcolor='" . $bgcolor . "' width='370px'> <div align='left' class='tablePad'>" . $concernsObj[0] . "</div> </td> <td bgcolor='" . $bgcolor . "' width='220px'> <div align='left' class='tablePad'>" . $concernsObj[1] . "</div> </td> </tr>"); } } ?> <!-- ---------------------- Family Concerns ---------------------- --> <tr><th colspan="2"><div align="center">Concerns about how others in the family are coping</div></th></tr> <?php $counter = 1; $bgcolor = ""; if($counter >= 1){ foreach($reactionInfoObject->copingBArray as $copingObj){ $counter++; if(($counter % 2) == 0){ $bgcolor="#e6e6e6"; }else{ $bgcolor="#d3d3d3"; } echo("<tr> <td bgcolor='" . $bgcolor . "' width='370px'> <div align='left' class='tablePad'>" . $copingObj[0] . "</div> </td> <td bgcolor='" . $bgcolor . "' width='220px'> <div align='left' class='tablePad'>" . $copingObj[1] . " </div> </td> </tr>"); } } ?> </table> <p></p> <?php if($reactionInfoObject->twoCount > 0){ echo('You marked ' . $reactionInfoObject->twoCount . ' item(s) as "Always / Very much". Most children have a few stress reactions to a sudden or frightening event like an injury, especially during the first few weeks. Based on your ratings, your child his having at least some stress reactions that might be really bothering him. There is a lot that you can do to help your child, but you may need some extra help'); }; ?> <p align="center" class="style2">-----------------------------------------------------------------------</p> <p align="center" class="style2">YOUR PERSONALIZED CARE PLAN -- WAYS TO HELP YOUR CHILD</p> <p align="left" class="style1">Remember, parents should continue to watch for stress reactions for at least the first 6 weeks after their child is injured. To make sure that a child has the best recovery, parents should call their child’s doctor or school counselor IF: <ul> <li>A child’s stress reactions go on for more than one month after the injury; or</li> <li>A child’s stress reactions get worse, bother him, or worry his parent(s); or</li> <li> A child’s stress reactions get in the way of his physical recovery. </li> </ul> </p> <p align="center" class="style1">Here are the tips you chose based on your ratings of your child's reactions and your concerns.<br /> We encourage <strong>you</strong> to come back to the website as needed to explore other care tips</p> <table border="0" align="center" cellpadding="5px" cellspacing="5px"> <tr><th colspan="2"><div align="center">How to help with Re-experiencing: Reliving what happened</div></th></tr> <?php echo("<tr><th bgcolor='#d3d3d3', colspan='2'>TIPS</th></tr>"); foreach($_SESSION["tipsArray"][0] as $tip){ echo("<tr><td bgcolor='#e6e6e6', colspan='2'><ul><li>" . $tip . "</li></ul></td></tr>"); echo("<br />"); } ?> <tr><th colspan="2"><div align="center">How to help with Avoidance: Staying away from reminders</div></th></tr> <?php echo("<tr><th bgcolor='#d3d3d3', colspan='2'>TIPS</th></tr>"); foreach($_SESSION["tipsArray"][1] as $tip){ echo("<tr><td bgcolor='#e6e6e6', colspan='2'><ul><li>" . $tip . "</li></ul></td></tr>"); echo("<br />"); } ?> <tr><th colspan="2"><div align="center">How to help with Hyper-arousal: Feeling anxious or jumpy</div></th></tr> <?php echo("<tr><th bgcolor='#d3d3d3', colspan='2'>TIPS</th></tr>"); foreach($_SESSION["tipsArray"][2] as $tip){ echo("<tr><td bgcolor='#e6e6e6', colspan='2'><ul><li>" . $tip . "</li></ul></td></tr>"); echo("<br />"); } ?> <tr><th colspan="2"><div align="center">How to help with other concerns</div></th></tr> <?php echo("<tr><th bgcolor='#d3d3d3', colspan='2'>TIPS</th></tr>"); foreach($_SESSION["tipsArray"][3] as $tip){ echo("<tr><td bgcolor='#e6e6e6', colspan='2'><ul><li>" . $tip . "</li></ul></td></tr>"); echo("<br />"); } ?> <tr><th colspan="2"><div align="center">How to help with concerns about how others in the family are coping</div></th></tr> <?php echo("<tr><th bgcolor='#d3d3d3', colspan='2'>TIPS</th></tr>"); foreach($_SESSION["tipsArray"][4] as $tip){ echo("<tr><td bgcolor='#e6e6e6', colspan='2'><ul><li>" . $tip . "</li></ul></td></tr>"); echo("<br />"); } ?> </table>
  14. I'm trying to get my php generated page into a PDF. I've tried fPDF, but found it too tedious to create all of the dynamic tables/images I'll use. I then tried to use free online tools that create html to PDF on the fly. My problem is that the online tools give me back just my static html not my php generated content. I even get php errors... When I view the source of my php in question, I see the normal html format (no php). I even tried to use file_get_contents and all I get is generic html with my url in a frameset??... I need to somehow grab the html that creates all the tables/info and extract that, can anybody lean me in the right direction. Thanks
  15. I have been using an open source upload/management script and I wanted to add a progress bar to the upload section (with KB/s too). I've tried a bunch of ways, but I'm unable to integrate it into my existing script. Could anyone offer some assistance, whether it be php/ajax/js My upload script uses three files: upload.php upload.tpl form.tpl I've included them in a .zip file here: http://www.basicfunction.com/upload.zip I will be forever grateful, THANKS!!!
×
×
  • 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.