Jump to content

jeffpoulsen

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jeffpoulsen's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have a script that is being created to login users using php. The script has a line to force the https protocal. This works well with Mozilla but breaks with IExplorer. Really odd. I cannot produce the script to have someone troubleshoot it but I can say it uses a "view_file.php" in the path to hide a protected directory. A link to a page would be something like https://domain/script_directory/view_file.php?file=the_file. IE can load the pages above the protected directory but cannot load links to the protected directory. Mozilla has no problem with any of this. Can anyone give me an idea of what could be going on here? Thanks for your time, jeff
  2. Hello All, I have created a script to generate a form, check it and send results to an email address which involves the form page, two files to check the input and send the results, after that the user is directed to another page. In order to do this I had to invoke ob_start() to keep from getting the headers sent error. I have tried to put ob_end_flush() at several places but this always results in an error. However without the closing ob_flush() the script works perfectly. My question is this. If I don't " flush " the buffer does this result in the cache buffer keeping the output after the user leaves the page or the script is run? If so could this result into a memory leak? Thanks for you help, jeff
  3. Thanks Chronister Below is the end of the code. Some parts are commented out for testing. I still recieve an error about sending the headers: if($valid == true) { //Sending Email to form owner /* $pfw_header = "From: $email\n" . "Reply-To: $email\n"; $pfw_subject = "From Join ML Form"; $pfw_email_to = "nobody@nowhere.non"; $pfw_message = "Visitor's IP: $pfw_ip\n" . "name: $name\n" . "lastname: $lastname\n" . "company: $company\n" . "title: $title\n" . "address1: $address1\n" . "address2: $address2\n" . "city: $city\n" . "state: $state\n" . "zip: $zip\n" . "email: $email\n" . "interests: $interests\n" . "other_interest: $other_interests\n" . "End of information"; @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ); */ header("Location: http://ourloca.tion/form_completed.php"); } else { echo "<center><a href=\"javascript:history.go(-1)\">Sorry, the code you entered was invalid<br>Go back to form</center>"; } } ?>
  4. Thanks freakstyle and chronister, My problem is I'm not to familiar with php. If I am reading correctly I need to end the session and destroy the existing header??? This comes at a place in the code when all conditions have been met. It's part of a "if" "else" statement. I don't know how to break out of the php page and return to the html site.
  5. I have a form that when properly filled out I would like to send the visitor to a new page. Not an include but a new page that thanks them for filling out the form and then redirects them to the site. I have found that goto is not included in PHP. Most examples I have found have many lines of code and seem so complicated. Is there a way to have this done simply? All help is greatly appreciated.
  6. Thanks for the help. It's hard to learn when even the books you use are wrong. Getting a little  closer but not there yet. I have tried the above codes and now it doesn't kill the script but what the object the lesson was to write to a flat file and have data go on a new line each time. None of these do that. The entire code for this is below. When I check the file /dwlog.txt it shows the date sent on one line.                 $today = date('M j g:i a'); $fh = fopen("dwlog.txt","a"); fwrite($fh,$today . "\n"); fclose($fh); By the way  fwrite($fh,"$today\n");  did not work. I can see learning PHP is going to be tough.
  7. I'm having trouble getting the new line \n to work in a simple fwrite line. The code is below: fwrite($fh,$today)      This Works fwrite($fh,$today"\n")  This does not  These line are straight out of the book I'm using to learn PHP. I have read about using <br> instead but can't get that to work either.
  8. Just starting to learn PHP on my own. I have a simple question. I have a simple line in and cannot get it to "echo" in the center of the page. The line is: echo date('M j g:i:a'); I don't want to put the code in a table but for this simple task I would rather not. I can get this to work for the preceding line: echo "<center>The Date and Time is</center>"; But not for the line above. I can find no answers at this stage. Can anyone help?
  9. Thanks for a quick reply. I can feel confident that PHP is worth the time. jeff
  10. Hello all,       I'm new to the forum so hello. I know nothing about PHP, a little about Java and HTML ( very little), but have the following need. I need to know if PHP can work before I look into it. I need a secure site that allows users to access information pages with links to PDF, HTML, DOC, XLS files etc. I need to be able to control login so that during login the user(s) are directed to the files they are allowed to see and not allow a user to revisit a page by saving the url and thus bypass the login. Also I need to be able to control (add and suspend) user or groups on the fly. And in addition harvest information such as email addresses, names etc along with ip addresses browsers, etc. And be able to validate these fields. Then send this information or log to an excel spreadsheet or similar and an html file. Can this all be done with PHP?
×
×
  • 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.