Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

72 users online



Script problem?

Script problem?

Currently viewing this thread: 1 (0 members and 1 guests)


Morbid_Martyr

Morbid_Martyr

Status: Offline!

Script problem?

Okay guys, i have this script for posting news on my site. The problem is i don't know how to post links! I was using the regular <a href> thing, but that didn't work at all. Do you guys know how to do this?

This was the code in one file:
<body bgcolor="black"><font face="verdana" size="1" color="white">

<?PHP
$data = file('news.txt');
$data = str_replace("\\'","&#39;",$data);
$data = str_replace("\\\"","&#34;",$data);
$data = array_reverse($data);
foreach($data as $element) {
$element = trim($element);
$pieces = explode("|", $element);
echo $pieces[2] . "<BR>" . "<b>Posted by " . $pieces[1] . " on " . $pieces[0] . "</b><BR><BR>";
}
?>

Then this is the code in another where the form is:
<FORM ACTION="<?=$PHP_SELF?>" METHOD="POST" NAME="newsentry">
Your name:<BR>
<INPUT TYPE="text" SIZE="30" NAME="name"><BR>
The News:<BR>
<TEXTAREA NAME="news" COLS="100" ROWS="30"></TEXTAREA><BR><BR>
News Password:<BR>
<INPUT TYPE="password" SIZE="30" NAME="password"><BR>
<INPUT TYPE="submit" NAME="submit" VALUE="Post it!"><BR>
</FORM>

Help!!

___________________

http://www.shatteredmetal.com/banners/shattered_banner.jpg

Bardock

Bardock

Status: Offline!

Then this is the code in another where the form is:
<FORM ACTION="<?=$PHP_SELF?>" METHOD="POST" NAME="newsentry">
Your name:<BR>
<INPUT TYPE="text" SIZE="30" NAME="name"><BR>
The News:<BR>
<TEXTAREA NAME="news" COLS="100" ROWS="30"></TEXTAREA><BR><BR>
News Password:<BR>
<INPUT TYPE="password" SIZE="30" NAME="password"><BR>
<INPUT TYPE="submit" NAME="submit" VALUE="Post it!"><BR>
</FORM>
[/QUOTE]

Im not the best at this, but try takin out the <?=$PHP_SELF?> in the form action. That was the only thing that stood out to me.

___________________

"To Become Different From What We Are, We Must Have Some Awareness Of What We Are"

-Bruce Lee

Rad

Rad

thinking of something witty to put here
Status: Offline!

Where are you trying to put the link?

Morbid_Martyr

Morbid_Martyr

Status: Offline!
Quote:

Originally posted by Radley
Where are you trying to put the link?

In the text field where i write the news. For example, "Here's an interview with Joe Schmoe. You can find it HERE." The HERE word is where i want the link to be. Problem is i don't know how to. Any clearer?

___________________

http://www.shatteredmetal.com/banners/shattered_banner.jpg

Rad

Rad

thinking of something witty to put here
Status: Offline!

You can't put links in text fields.

Morbid_Martyr

Morbid_Martyr

Status: Offline!
Quote:

Originally posted by Radley
You can't put links in text fields.

Okay how do news websites do it then?

___________________

http://www.shatteredmetal.com/banners/shattered_banner.jpg

Rad

Rad

thinking of something witty to put here
Status: Offline!

Could you show me an example?

Rad

Rad

thinking of something witty to put here
Status: Offline!

Could you show me an example?

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0077 seconds.