Results 1 to 5 of 5

Thread: Help? :} + Rep

  1. #1
    Join Date
    May 2005
    Location
    united kingdom
    Posts
    8,084
    Tokens
    595

    Latest Awards:

    Default Help? :} + Rep

    Ok, I want it so via let's say 'an admin panel' you can edit the marquee. In the 'admin' panel I have this code:

    PHP Code:
    <form action="marquee.php" method="post">
    Text: <input type="text" name="text"><BR>
    Direction: <input type="text" name="direction"><BR>
    <
    input type="submit" value="Create"> <input type="reset" value="Duh."></form></center></div
    Yes my coding is bad. But meh. In my marquee.php file I have:

    PHP Code:
    <marquee direction="<?php echo $_POST["direction"]; ?>"><?php echo $_POST["text"]; ?></marquee>
    and then I have it showing an iframe. On the index.

    It doesn't show anything *****, it shows me it on the page after I press create but it doesn't save it.

    drink up this bottle of yeah
    and P A I N T your body on me


  2. #2
    Join Date
    Sep 2006
    Location
    Wakefield, West Yorkshire
    Posts
    162
    Tokens
    0

    Default

    You need to make it save it.

    marquee.php
    PHP Code:
    <?php

    $marqueefile 
    fopen("marquee.html""w");

    fwrite($marqueefile'<marquee direction="'.$_POST["direction"].'">'.$_POST["text"].'</marquee>');

    fclose($marqueefile);
    ?>
    Then you would have marquee.html showing in the iframe.

    Dont know if it'd work, havent tested it.
    Last edited by -1.; 14-01-2007 at 02:49 PM.
    Left. Or have I?

  3. #3
    Join Date
    May 2005
    Location
    united kingdom
    Posts
    8,084
    Tokens
    595

    Latest Awards:

    Default

    Thanks I'll try that later =)

    drink up this bottle of yeah
    and P A I N T your body on me


  4. #4
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Quote Originally Posted by SyrupyMonkey View Post
    Thanks I'll try that later =)
    You would need to CHMOD that marquee.php and the txt file to 777

  5. #5
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    CHMod the marquee.php and txt to 777 so it will save.

    Also you may want to make a dropdown box with the up down left right etc instead of a text box

    Kevin

Posting Permissions

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