#1
|
||
|
need some help
I folowed this tutorial on how to make a news system, it works pretty nice, but its not exactly 100% what im looking for.
I would like to make a script that adds a link to each news listing, using the title of the news listing as the link. when the user clicks that link, that news listing will be opened in a new page.. Basicly this is going to be used as a script where people can submit tutorials on mapmaking.. the form: [code:1:66709816e9]<? if($HTTP_POST_VARS['submit']) { if($HTTP_POST_VARS['password'] == 'password') { if(!$HTTP_POST_VARS['name']) { echo "You must enter a name"; exit; } if(!$HTTP_POST_VARS['news']) { echo "You must enter some content"; exit; } if(strstr($HTTP_POST_VARS['name'],"|")) { echo "Name cannot contain the pipe symbol - |"; exit; } if(strstr($HTTP_POST_VARS['news'],"|")) { echo "News cannot contain the pipe symbol - |"; exit; } $fp = fopen('news.txt','a'); if(!$fp) { echo "Error opening file!"; exit; } $line = date("m.d.y") . "|" . $HTTP_POST_VARS['name']; $line .= "|" . $HTTP_POST_VARS['news']; $line = str_replace("\r\n","<BR>" ;,$line); $line .= "\r\n"; fwrite($fp, $line); if(!fclose($fp)) { echo "Error closing file!"; exit; } } else { echo "Bad Password"; } } ?> <FORM ACTION="<?=$PHP_SELF?>" METHOD="POST" NAME="newsentry"> Your name:<BR> <INPUT TYPE="text" SIZE="30" NAME="name"><BR> The tutorial:<BR> <TEXTAREA NAME="news" COLS="120" ROWS="50"></TEXTAREA><BR><BR> Password:<BR> <INPUT TYPE="password" SIZE="30" NAME="password"><BR> <INPUT TYPE="submit" NAME="submit" VALUE="Post it!"><BR> </FORM>[/code:1:66709816e9] Any help on this will be grreatly appreciated |
#2
|
||
|
Nevermind, I got it fixed
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|