Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: _.-*>another Problem!<*-._

  1. #11
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Code:
    <? @chmod("requests.php", 0777);
      if(!is_writable("requests.php")){
        @chmod("requestline.php", 0777); 
        if(!is_writable("requestline.php")){
    
    // somewhere else on the script
    
        } 
      }
    please don't take this the wrong way but, do u have any background/training at all with any programming language available in the market like ( i dunno) Turbo Pascal, Turbo C, C++, Java, JavaScript, VB.NET, C#, J# to name a few

    i just would like to assess what are ur strengths and weaknesses in regards to understanding code snippets and programming jargons.

  2. #12
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Nope only Html and Php...

    Can you guys look at this:

    Code:
    <?
    $dbhost = "DBHOST";
    $dbuser = "DBUSER";
    $dbpwd = "DBPASSWORD";
    $dbname = "DBNAME";
    mysql_connect($dbhost, $dbuser, $dbpwd);
    mysql_select_db($dbname);
    ?>
    <html>
    <head>
    <title>Request Line</title>
    </head>
    <body>
    <?php
    if (!isset($_POST['submit'])) {
    ?>
    <form action="" method="post">
    Habbo Name: <input type="text" name="Habbo Name"><br>
    Song Request: <input type="text" name="Snog Request"><br>
    Shoutout/Joke: <input type="text" name="Shoutout/Joke"><br>
    <input type="submit" name="submit" value="Request">
    </form>
    <?php
    $Habbo Name = $_POST['Habbo Name'];
    $Song Request = $_POST['Song Request'];
    $Shoutout/Joke = $_POST['Shoutout/Joke'];
    mysql_query("INSERT INTO `request` (Habbo Name, Song Request, Shoutout/Joke) VALUES ('$Habbo Name', '$Habbo Name', '$Shoutout/Joke')");{
    echo "Your Request has ben sent!
    ?>
    </body>
    </html></body>
    </html>


    I seem to be getting this error:

    Parse error: parse error, unexpected T_STRING in /fpgs/fpgshttpd/smileyoureahabbo/scripts/radiobox/requestline.php on line 24
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  3. #13
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Nope only Html and Php...
    tnx for that info.

    Code:
    if(condition)
      sun is up;
    else
      raining;
    in this case, there is no need for open and close curly brace { }

    but
    Code:
    if (condition) {
       sun is up;
       joe will play outside;
    } else {
       raining;
       joe will play inside;
    }
    in this case, there should be a corresponding closing curly brace for every open curly brace that exists in the script.

    NOW, to the heart of the matter
    Like Twey said
    Quote Originally Posted by Twey
    It's a rather unhelpful error, I must admit. Newer versions of PHP are more descriptive.

    What it's trying to tell you is that the page has ended while there's still a code block open.

  4. #14
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The latest problem:
    Code:
    mysql_query("INSERT INTO `request` (Habbo Name, Song Request, Shoutout/Joke) VALUES ('$Habbo Name', '$Habbo Name', '$Shoutout/Joke')");{
    echo "Your Request has ben sent!";
    The red brace shouldn't be there but is, and the blue quote and semicolon should be there but aren't
    Code:
    </body>
    </html></body>
    </html>
    Conversant with HTML, eh?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #15
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Still gets error... (on latest problem)
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  6. #16
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Oh, and the variable names are totally ridiculous.

    A variable name may contain only alphanumeric characters and underscores, can't start with a number, and must always be prefixed with a dollar sign ($).
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #17
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Unless the variable name is in a string...

    PHP Code:
    <?php
    $array
    ['456'];
    $array['-'];
    >?


    <?
    php ${'456'} = "my number variable"?>
    Would then work just the same...

    Complex I know.. but at least I am learning some of this stuff
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  8. #18
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok... That didn't even fix it...
    Heres the script now:

    Code:
    <?
    $dbhost = "DBHOST";
    $dbuser = "DBUSER";
    $dbpwd = "DBPASSWORD";
    $dbname = "DBNAME";
    mysql_connect($dbhost, $dbuser, $dbpwd);
    mysql_select_db($dbname);
    ?>
    <html>
    <head>
    <title>Request Line</title>
    </head>
    <body>
    <?php
    if (!isset($_POST['submit']));{
    ?>
    <form action="" method="post">
    Habbo Name: <input type="text" name="Habbo Name"><br>
    Song Request: <input type="text" name="Snog Request"><br>
    Shoutout/Joke: <input type="text" name="Shoutout/Joke"><br>
    <input type="submit" name="submit" value="Request">
    </form>
    <?php
    $HabboName = $_POST['Habbo Name'];
    $SongRequest = $_POST['Song Request'];
    $ShoutoutJoke = $_POST['Shoutout/Joke'];
    mysql_query("INSERT INTO `request` (Habbo Name, Song Request, Shoutout/Joke) VALUES ('$HabboName', '$SongRequest', '$ShoutoutJoke')");{
    echo "Your Request has ben sent!";
    ?>
    </body>
    </html></body>


    I get error:


    Parse error: parse error, unexpected $ in /fpgs/fpgshttpd/smileyoureahabbo/scripts/radiobox/requestline.php on line 32
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  9. #19
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You still haven't removed that opening brace I told you to.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #20
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Which One?
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

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
  •