PDA

View Full Version : Help? :} + Rep



myke
14-01-2007, 01:24 PM
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:


<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:


<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.

-1.
14-01-2007, 02:49 PM
You need to make it save it.

marquee.php


<?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.

myke
14-01-2007, 05:06 PM
Thanks I'll try that later =)

Blob
14-01-2007, 05:57 PM
Thanks I'll try that later =)

You would need to CHMOD that marquee.php and the txt file to 777

Dentafrice1
14-01-2007, 07:31 PM
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

Want to hide these adverts? Register an account for free!