When executing the email2mysql.php file taken from here, I get this error message

Parse error: syntax error, unexpected 'stream' (T_STRING) in email2mysql.php on line 73

  • The link is to a forum discussion - with lots of code. please tell us exactly where you got the code from - maybe the user name & date/time fo their post? But preferably an actual URL, unless it is inline on that forum. – Mawg Jan 22 '18 at 8:14
  • Welcome aboard. We would like to help, but this is the wrong site. We recommend software tools here; we don't fix code. You should ask at Stack Overflow At that site you always have to 1) post the code (not a link to it) 2) say what it is supposed to do 3) say what it is doing wrongly instead. For sure we will help you over there :-) – Mawg Jan 22 '18 at 8:17

When I get this, it is usually because I failed to put a semi-colon on the line above it.

I have also made the mistake of having quotes or apostrophes mismatched or nested incorrectly.

I have also made the mistake of allowing lines of code to flow together, where one line has "end-of-line" comments, and what was supposed to be the next line has moved to be within the scope of that comment.

I recommend a programmer's text editor that shows PHP syntax as colored letters. This will make plain any of the above errors.

I recommend UltraEdit, GitHub's Atom editor, or Notepad++.

  • It could also be mismatched quote. I would strongly advise you not to use an editor - get yourself an IDE - which Atom is ([Eclipse]9https://www.eclipse.org/pdt/) is also very popular with professional developers, as is Netbeans. Just choose an IDE which you like, the important thing is that it lets you debug your code. You can set a "breakpoin" and the code will run until that line. Then you can examine, and even change, the values of your variables. You can see the callstack - which function called which, with what parameters ... – Mawg Jan 22 '18 at 8:22
  • ... and step through the code, line by line. It is extremely difficult to develop software without using the debugger, so get started as soon as you can. It will answer most of your questions, before you even think of Stack Overflow :-) – Mawg Jan 22 '18 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.