Search the Community
Showing results for tags 'header'.
-
I am working with the "secure" version of contact form script 12.1 described in "Chapter 12 - Security Methods" (pg. 365) but would like to modify this so that rather than simply printing a thank you message, the user is redirected to a thank you page. I have tried replacing the given script: // Minimal form validation: if (!empty($scrubbed['email'])) { // Create the body: $body = "Name: {$scrubbed['name']}\n\nComments: {$scrubbed['comments']}"; $body = wordwrap($body, 70); // Send the email: mail('XXX@XXX', 'Contact Form Submission',
-
When a user clicks a button in my application, it is supposed to reroute them to a certain page in my application, but instead I get the following error message: Cannot modify header information - headers already sent by (output started at /home/colly/public_html/myapp/ItemsController.php:218) and here is the function inside of the itemsController that generates the error: public function actionRedirectSomewhere($itemId) {$this->redirect(array('items/index'));} It still gives me the same error if I call the function without the parameter like this: actionRedirectSomewhere()
-
Hi everyone, I am really enjoying your book Larry, thanks. My problem is I am on the page where you use the header function and javascript to display the images from the uploads folder. I have one picture and for some reason when I click it, it does nothing. Would anyone care to look at my code or give me some hints as to why it is not working? I have tried the following: Compare my code to Larry's code Used Larry's code Enabled pop-ups Moved the javascript folder to a different location (a folder above and then changing the a href to ../javascript) images.php <!DOCTY