SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Parse Error With Script..

    Hey I'm working on a news script and I just got this parse error:

    Parse error: parse error in /host/g/e/n/p/o/r/genelement.port5.com/news/genupdate.php on line 440
    This is the source code for the script:
    http://genelement.port5.com/news/genupdate.txt

    Line 440 is
    PHP Code:
    case 3
    Last edited by Kuraden; Sep 30, 2002 at 14:32.

  2. #2
    ********* Celica Lover Coomer's Avatar
    Join Date
    Apr 2002
    Location
    Not worth the drive
    Posts
    474
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You really should post maybe just a few lines of code near the error, and if we can't figure it out then we'll tell you to post more of your code. If not that, then please at least post code with line numbers. No-one will want to count line numbers and then go through 440+ lines of code. If you post just a little bit of code then I'll try to help you.

    Edit:

    Guess you added the line that the error is on after I started replying. Maybe you could post a little more of the code around the error?
    + Celica =
    6G Celicas :: My '94-99 Toyota Celica resource

  3. #3
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <table border='0' width='100%' cellspacing='0' cellpadding='0'>
    <
    tr>
    <
    td width='100%' bgcolor='$menubg2'>
    &
    nbsp;
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width='100%' bgcolor='$menubg2'><font face='Arial'><textarea rows='6' name='news' cols='40'>$news</textarea><BR><input type=hidden name=mode value=Edit><input type=submit name=update value=Update><input type=submit name=delete value=Delete></font></td><a onclick=AddCode('<img border=0 src=smilies/happy.gif>')><img border=0 src=smilies/happy.gif></a><a onclick=AddCode('<img border=0 src=smilies/sad.gif>')><img border=0 src=smilies/sad.gif></a><a onclick=AddCode('<img border=0 src=smilies/veryhappy.gif>')><img border=0 src=smilies/veryhappy.gif></a><a onclick=AddCode('<img border=0 src=smilies/happy.gif>')><img border=0 src=smilies/happy.gif></a>
    </
    tr>
    </
    table>
    </
    form></td></tr></table>";}}}
    break;
    case 3:
    if(
    $adduser) {
    $connection = mysql_connect($dbhost$dbuser$dbpass) or die("Invalid server or user"); 
    $query = "SELECT user FROM users WHERE user '$newuser'"; 
    $result = mysql_db_query($dbname$query$connection) or die("Error in query"); 
    $num_rows = mysql_num_rows($result);
    if (
    $num_rows == 0) 
    I'm thinking there's something wrong in case 2 but I just can't find it

  4. #4
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I just fixed the problem, but I still want to know something. When a user would login to my script, the url changes from "genupdate.php" to "genupdate.php?Sessid=&username=theusername&password=thepassword".

    Is there any way to hide the username and password information (just incase something happens)? Thanks in advance!

  5. #5
    .NET inside archigamer's Avatar
    Join Date
    Jan 2002
    Location
    Strongsville OH
    Posts
    1,534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    change the form method to post, and where you have

    $_GET[] will have to be become $_POST[]
    Web Finesse Studios
    Professional, business oriented web hosting and development.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •