davediamondprovo Posted December 30, 2006 Share Posted December 30, 2006 This code will NOT spit out my session variable and I've tried single quotes, double quotes and it's driving me crazy.[code]$firstParagraph = "Thanks, " . $HTTP_SESSION_VARS['ClientName'] . "Your scripts have been submitted successfully.</p><p>Now, after I laugh at your copy, I\'ll read and deliver it to the email address you provided with your submission, " . $HTTP_SESSION_VARS['ClientEmail'] . ". I hope you entered a valid email address. You did, didn\'t you? Excellent!";[/code]Anyone help here? Yes, I'm a noob! Quote Link to comment Share on other sites More sharing options...
AV1611 Posted December 30, 2006 Share Posted December 30, 2006 Yes you are. You Don't need to escape the ' in I'll though as it is taken literal by the " " on the stringPerhaps you can show the script? it may be something else Quote Link to comment Share on other sites More sharing options...
davediamondprovo Posted December 30, 2006 Author Share Posted December 30, 2006 Thanks for the reply.. code below[code]<?require_once ("config.php");include ("text.php");session_start();if($HTTP_POST_VARS['ClientName'] > null && $HTTP_POST_VARS['ClientEmail'] > null){session_start(); $HTTP_SESSION_VARS['ClientName'] = stripslashes($HTTP_POST_VARS['ClientName']); $HTTP_SESSION_VARS['ClientEmail'] = $HTTP_POST_VARS['ClientEmail']; $HTTP_SESSION_VARS['ClientCopy'] = $HTTP_POST_VARS['ClientCopy'];} $title = $thanksTitle; include 'inc/header.php'; echo $heading; echo $tagline; echo $thanksHeader; echo $firstParagraph;if($HTTP_SESSION_VARS['ClientCopy'] == '1') { echo $copyAccepted;}if($HTTP_SESSION_VARS['ClientCopy'] == '0') { echo $copyDeclined;} echo $thirdParagraph; echo $signOff; echo $bottomNav; include 'inc/footer.php'; $HTTP_SESSION_VARS = array(); session_destroy();?>[/code][code]############################################################### THANKS.PHP PAGE TEXT ############################################################################################$thanksTitle = 'Fallen Down the Steps : Thanks!';#### $thanksHeader starts with a <div> tag that's closed below. Do not remove it.$thanksHeader = '<div class="fieldc"><h3>You Did It!</h3>';$firstParagraph = $firstParagraph = "Thanks, " . $HTTP_SESSION_VARS['ClientName'] . "Your scripts have been submitted successfully.</p><p>Now, after I laugh at your copy, I'll read and deliver it to the email address you provided with your submission, " . $HTTP_SESSION_VARS['ClientEmail'] . ". I hope you entered a valid email address. You did, didn't you? Excellent!";$copyAccepted = '<p><b>I noticed you chose to receive a copy of your scripts. That\'s a good idea since I\'ll probably loose them and need you to forward them to me again.</b></p>';$copyDeclined = '<p><b>Too bad you didn\'t opt for a copy of your scripts. Oh sure, I could send you a copy but then again, that\'s why I put the silly option there so I wouldn\'t have to. It\'s ok though, I get bored around here sometimes.</b></p>';$thirdParagraph = '<p>Ok sit back and think of more ridiculous promotions for your station while I go to lunch, perhaps a movie and then return to the studio to cut your lame copy.</p>';#### closing </div> is in the $signOff variable below$signOff = '<p>Have a nice day!</p></div>';$bottomNav = '<p align="center"><a href="index.php" class="noll">Submit More Scripts</a> - *cringe*</p>';[/code]Thanks for any help you can provide.Dave Quote Link to comment Share on other sites More sharing options...
davediamondprovo Posted December 31, 2006 Author Share Posted December 31, 2006 bump Quote Link to comment Share on other sites More sharing options...
fert Posted December 31, 2006 Share Posted December 31, 2006 you shouldn't use $HTTP_SESSION_VARS you should use $_SESSION Quote Link to comment Share on other sites More sharing options...
davediamondprovo Posted December 31, 2006 Author Share Posted December 31, 2006 I figured this out with the help of you here. I moved my first session_start(); directive to the top after the opening php tag. Works! Thanks![code]<?session_start();require_once ("config.php");include ("text.php");if($HTTP_POST_VARS['ClientName'] > null && $HTTP_POST_VARS['ClientEmail'] > null){session_start(); $HTTP_SESSION_VARS['ClientName'] = stripslashes($HTTP_POST_VARS['ClientName']); $HTTP_SESSION_VARS['ClientEmail'] = $HTTP_POST_VARS['ClientEmail']; $HTTP_SESSION_VARS['ClientCopy'] = $HTTP_POST_VARS['ClientCopy'];} $title = $thanksTitle; include 'inc/header.php'; echo $heading; echo $tagline; echo $thanksHeader; echo $firstParagraph;if($HTTP_SESSION_VARS['ClientCopy'] == '1') { echo $copyAccepted;}if($HTTP_SESSION_VARS['ClientCopy'] == '0') { echo $copyDeclined;} echo $thirdParagraph; echo $signOff; echo $bottomNav; include 'inc/footer.php'; $HTTP_SESSION_VARS = array(); session_destroy();?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.