Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Now that you know that function has been DEPRECATED (as in gone, not 'reduced in value'), the answer to your question is simply to use if (isset($_SESSION['isAuthenticated']) && ($_SESSION ['isAuthenticated'] = "loggedIn")) NOTE - I left the error in your code in my sample. You have only one = sign in your compare - you need two.
  2. Is you mail client ready to receive html mail? It's an option often.
  3. As Ansego said - show us how you send the mail. Very important piece you forgot to show us.
  4. Its' probably a function of your browser's handling of textareas. Try using your css to specify the same font for textarea tags as you are using in the rest of your page.
  5. Or simply don't use the strtotime function call. Date() is providing you what you want but then you go and turn it back into an integer. BTW - the result of date() is not an integer.
  6. You need to show more code. Your question mentions MySQL info which we have no idea about; your html snippet is rather incomplete so as to make it hard to fully interpret for correctness; and your mention of a submit button doesn't show us any code that defines it nor processes it. Besides that if there truly is no submit button clicked then hih do you even get to your php script???
  7. Seems like I'm wasting my time here. You've been supplied with ample advice that you apparently don't want to use. Why should I expect you to follow my advice then, especially since you have already ignored my first response? Good bye.
  8. My plan is that using the prepare repeatedly is eating up your ram. Can't hurt to try my recommendations.
  9. Who mentioned jquery? not me. If you want to update the page in front of the user without refreshing/re-displaying it, you have to use ajax. If you want to change your requirements so that you can take the input, run a php script and then display a page with new data then you don't need ajax or js or even jquery
  10. 1 - you are using prepared statements so no need to add slashes. 2 - The beauty of prepared statements is you only prepare it once and then run the execute with the specific arguments you have for each query. Move the prepare up before your loop. 3 - I don't understand your content at all, but it appears you have one odd " mark in the string each time. Is that what you intend? Plus - what is [\php] supposed to represent?
  11. If you want to run your query and show the results on the same page that your input came from you should look into using an ajax process to trigger a php script and then capture the results and use js to place them on your page with the complete refresh. Sorry - don't have an example to show you here.
  12. Further reading of the manual indicates that while the sample header of the function call implies that the domain is not optional, the text below indicates that it may be left out. As for the path, I failed to see that you did include that one. So - ignore my response. As already mentioned above, be sure that no output precedes your call to setcookie AND also realize that you won't see an updated cookie value until the next page load. That means if you set the cookie in your script and want to check it immediately after, you can't. So if you are using user input to set the cookie, use that same input to set a local var to be used during the rest of the script. Do the same when retrieving the cookie value on successive executions.
  13. YOu are confusing yourself and me. You start a loop to retrieve each row of your query results, but then you grab the next row into $id & $name. So you have data pieces from two separate rows each time thru this loop. Is that what you want?
  14. I'm going to start saying my next in all caps because it needs to be driven home for every php coder. TURN ON PHP ERROR CHECKING! error_reporting(E_ALL | E_NOTICE); ini_set('display_errors', '1'); WHEN YOU ARE DEVELOPING YOU NEED THIS! That said: What is $GET???
  15. Have a look at the manual re: setcookie. To me it appears you are leaving off 2 parameters that PHP does not default for you.
  16. read a book on programming. Every language (almost) has loops, whether they use verbs like 'for', 'foreach' 'do -while', 'repeat - until' or whatever else I've forgotten. There's nothing magical. You have a block of code that you want to run over and over against some kind of data and the loop does it for you. It's just a matter of choosing the right loop for your situation. Some loops check the condition prior to executing the included code, others check it at the end. This is not rocket science so you simply need to spend some time reading and learning instead of crying.
  17. Why do you have to repeatedly install these frameworks?
  18. If you had php error checking turned on you probably would have seen an error re: your use of the mail() function. Go read the syntax of this and use it correctly.
  19. Can you give us a more complete view of your code? Pieces are hard to follow. Also - you really should consider separating your php logic from your presentation code. Create vars in your php code and then output your html with the vars included rather than turn on php mode to do something (that should have already been done) and turn off php mode.
  20. FPDF is really not that hard. Try to design your document in terms of the rows and columns instead of absolute coordinates, except where you want to do something like a logo in a corner or something like that. Picture your line items as a set of columns. When you call Cell for each data item, specify the width of that column regardless of the size of the actual data being output. Of course you need to consider the data size when you choose the column width. Do not use SetX for every output after you have done this - simply let fpdf handle the positioning and only set the 'ln' parm to '1' when you are done with a line. Think of designing a spreadsheet. What I do is set up some php vars for each column size: ( I use inches - you seem to be using mm) $lnht = .2; $col1 = 1.5; $col2 = .5; $col3 = 1.5; ... ... Then my output lines look like: $pdf->Cell($col1,$lnht,$col1_value,0,0,'L'); $pdf->Cell($col2,$lnht,$col2_value,0,0,'L'); $pdf->Cell($col3,$lnht,$col3_value,0,1,'L'); Note the last Cell call triggers a new line with the '1' value.I only use setx, sety for special documents layout. For straight up forms with simple rows and columns this works great for me. Keep playing - it'll come to you.
  21. What does your loop do the FIRST time thru since $data has not been defined yet? Even if it doesn't completely fail, why do you want to run thru all that code before you have read a row from your file yet? Wouldn't this form of the do/while concept work better: while ($data = fgetcsv($handle)) { (do your stuff) } PS - you should use ' ' on your indices in associative arrays.
  22. What is it that you don't understand? You say you have a problem with loops, but what is it?
×
×
  • 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.