+ Reply to Thread
Results 1 to 4 of 4

Thread: Warning: Unexpected character in input

  1. #1
    brohaz is offline x10Hosting Member brohaz is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    3

    Warning: Unexpected character in input

    Hi all im have some problems wiht a php file i made.

    when i access the script i get the following error message:

    Warning: Unexpected character in input: "' (ASCII=39) state=1 in [my dir] on line 63

    Parse error: syntax error, unexpected ')' expecting ']' in [my dir] on line 63

    the code around there is:

    Code:
    }else if ($_POST) {
     
    if ((!$_POST["topic_id"]) || (!$_POST["post_text']) || (!$_POST["post_owner"])) {
     
    header("Location: topiclist.php");
    exit;
    }
    i have manged to fix it im not sure how but now i got anew message saying something about an unexpected ";" on line 65. line 65 is a blank line.
    Last edited by brohaz; 10-02-2009 at 12:27 AM. Reason: fixed it!!!

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Warning: Unexpected character in input

    Try a coloring editor, or use the [php] tags rather than the [code] tags and you'll see the problem:
    PHP Code:
    }else if ($_POST) {
     
    if ((!
    $_POST["topic_id"]) || (!$_POST["post_text']) || (!$_POST["post_owner"])) {
     
    header("
    Locationtopiclist.php");
    exit;

    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Warning: Unexpected character in input

    Quote Originally Posted by brohaz View Post

    i have manged to fix it im not sure how but now i got anew message saying something about an unexpected ";" on line 65. line 65 is a blank line.
    A. If you are using FileManager, use the CodeEditor.
    B. Is the code posted the latest after your "fix"?
    Nothing is always absolutely so.

  4. #4
    ichwar's Avatar
    ichwar is offline Community Advocate ichwar is an unknown quantity at this point
    Join Date
    Dec 2008
    Location
    NC, USA
    Posts
    1,454

    Re: Warning: Unexpected character in input

    Quote Originally Posted by misson View Post
    Try a coloring editor, or use the [php] tags rather than the [code] tags and you'll see the problem:
    PHP Code:
    }else if ($_POST) {
     
    if ((!
    $_POST["topic_id"]) || (!$_POST["post_text']) || (!$_POST["post_owner"])) {
     
    header("
    Locationtopiclist.php");
    exit;

    Wow, good catch.

    Change your code to this brhoz:
    PHP Code:
    }else if ($_POST) {
     
    if ((!
    $_POST["topic_id"]) || (!$_POST["post_text"]) || (!$_POST["post_owner"])) {
     
    header("Location: topiclist.php");
    exit;


+ Reply to Thread

Similar Threads

  1. Replies: 14
    Last Post: 09-29-2008, 07:07 PM
  2. It works! ...
    By bpakidz in forum Programming Help
    Replies: 4
    Last Post: 09-07-2008, 11:12 PM
  3. New Site-Suggestions?
    By mnoutside in forum Review My Site
    Replies: 9
    Last Post: 08-27-2008, 07:01 AM
  4. GeIP Script Help
    By cybahq in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 07-30-2008, 06:19 AM
  5. GeIP Script Help
    By cybahq in forum Free Hosting
    Replies: 4
    Last Post: 07-30-2008, 05:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers