SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: Please Help

  1. #1
    SitePoint Addict sleepingdanny's Avatar
    Join Date
    Oct 2002
    Location
    Israel
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Please Help

    Why does when I try to update the news file it alwayes update it, but adds "/" near colors or urls ?? How can I stop it ??
    PHP Code:
    <html>
    <head>
    <title>Edit News</title>
    </head>
    <body>
    <style type="text/css">
    body,input,textarea{
    font-family:tahoma;
    font-size:8pt;
    }
    a{text-decoration:none;
    }
    </style>
    <center>
    <?
    $filename
    ="/home/.../newsflash.php";
    $txt=$_POST['txt'];
    if(
    $txt){
    $fpw=fopen($filename,"w");
    if(
    $fpw){
    print 
    "News Updated Succesfully!<br><br>";}
    if(!
    fwrite($fpw$txt)){
    print 
    "<font color=red><b>ERROR</b>:</font> Unable To Update The News!<br><br>";
    exit;
    }
    fclose($fpw);
    }
    if(
    file_exists($filename)){
    $fpr=fopen($filename,"r");
    $content=fread($fpr,filesize($filename));
    fclose($fpr);
    }
    ?>
    <form method="POST">
    <textarea rows="20" cols="150" name="txt"><?=$content?></textarea><br>
    <input type="submit" value="Update">
    </form>
    </center>
    </body>
    </html>

  2. #2
    SitePoint Addict sleepingdanny's Avatar
    Join Date
    Oct 2002
    Location
    Israel
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its ok I found the problem

  3. #3
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    magic_quotes are evil! TURN THEM OFF!
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  4. #4
    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)
    or if you don't have access, use stripslashes()
    Aaron Brazell
    Technosailor



  5. #5
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    htaccess is a friend

    I wonder.. anyway to control PHP on an IIS server at runtime?
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  6. #6
    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)
    Well perhaps you should provide that solution, Eric...
    Aaron Brazell
    Technosailor



  7. #7
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in .htaccess,

    Code:
    php_flag magic_quotes_gpc off
    php_flag magic_quotes_runtime off
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  8. #8
    SitePoint Member sc00pb's Avatar
    Join Date
    Feb 2003
    Location
    Phoenix, Az.
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That sounds good.
    • "The man who can't see a horse galloping on a tomatoe is an idiot." "Andre Breton"


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
  •