SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Oct 2003
    Location
    Oklahoma
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    News Script Trouble

    Hello all,
    I recently had some help from someone who helped create a simple news script for my clan's website. Today, I used my webhosts 'File Manager' to edit the 'addnews.php' file so that I could list others as people submitting news. (2-3 more names aside from the ones you will see in this script)

    When I saved the file, it somehow messed it up so that I get an error after clicking submit that says: 'Section not found!'

    I realize this is probably an error created by the error file. I will show what I need to show and take out any database/webhost information. Can someone please help me identify the area where this script is messing up?

    Below is the script:

    <?php
    include("functions.php");
    if ( $session[logged_in] )
    {
    ?>
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <STYLE>
    .mystyle1 { font-family: tahoma; font-size: 10 px; color: #000000; text-decoration: none; background-color: #ffffff; border-color: #cccccc #cccccc #cccccc; border-style: dashed; border-top-width: 1 px; border-right-width: 1 px; border-bottom-width: 1 px; border-left-width: 1 px }
    .mystyle99 { BACKGROUND:#ffffff;COLOR:#000000;FONT-FAMILY:Tahoma;FONT-SIZE:10;}
    </STYLE>
    </head>

    <body text="#CCCCCC" link="#CCCCCC" vlink="#CCCCCC" alink="#CCCCCC" leftmargin="0" topmargin="0">
    <form name="form1" method="post" action="?page=addnews action=add">
    <table width="425" border="0" align="left" cellpadding="0" cellspacing="0">
    <tr>
    <td width="423">
    <table width="385" border="0" align="center" cellpadding="0" cellspacing="1">
    <tr>
    <td width="53"><font color="#000000" size="2" face="Tahoma">Name/font></td>
    <td width="325"><select name="name" id="name" class="mystyle1">
    <option value="Choose Name">Choose Name</option>
    <option value="---">---</option>
    <option value="[clan]Travis">[clan]Travis</option>
    <option value="[clan]Sylem">[clan]Sylem</option>
    <option value="[clan]Nomore">[clan]Nomore</option>
    </select></td>
    </tr>
    <tr>
    <td><font color="#000000" size="2" face="Tahoma">Subject/font></td>
    <td><input name="subject" type="text" id="subject" size="25" class='mystyle1'></td>
    </tr>
    <tr>
    <td><font color="#000000" size="2" face="Tahoma">News/font></td>
    <td><textarea name="news" cols="70" rows="10" id="news" style=' font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10 px; color: #000000; text-decoration: none; background-color: #ffffff; border-color: #cccccc #cccccc #cccccc; border-style: dashed; border-top-width: 1 px; border-right-width: 1 px; border-bottom-width: 1 px; border-left-width: 1 px '></textarea></td>
    </tr>
    <tr>
    <td colspan="2"><input name="submit" type='submit' style='font:10pt Tahoma; border:1 solid #000000; cursor:hand; background:#ffffff; color: #000000; ' value="Submit">
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    <?
    }
    else
    header("Location: ?page=error");
    ?>
    Thanks!

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    make sure you put session_start(); at the top of your page.
    Aaron Brazell
    Technosailor



  3. #3
    SitePoint Member
    Join Date
    Oct 2003
    Location
    Oklahoma
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I got that in there, although I am still recieving the error.

  4. #4
    La la la la la bronze trophy lieut_data's Avatar
    Join Date
    Jun 2003
    Location
    Waterloo, ON
    Posts
    1,517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This doesn't appear to be right:
    action="?page=addnews action=add">
    In your <form> tag -- perhaps:
    Code:
    action="?page=addnews&amp;action=add">
    My name is Steve, and I'm a super-villian.


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
  •