Toon posts:

[PHP] if(file_exists("$account_id$mainext")) {

Pagina: 1
Acties:
  • 38 views sinds 30-01-2008

Verwijderd

Topicstarter
http://www.saiyanarena.com/en/?id=post-a-comment&rid=5
Ik komt het dat ik hier soms "file doesn't excist" krijg en soms kan ik gewoon posten. Dit ligt ook aan de client, sommige mensen kunnen wel posten, maar sommigen weer niet.

post-a-comment.php;
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 <?php  
if ($submit) {  
if ($naam == "" || $bericht =="") {   

echo "You forgot to enter something, 
<a href=\"javascript:history.go(-1)\">Go back...</a>";  
}  
else {  

$ip = $REMOTE_ADDR;  
$datum = $dagen_array = array("");  
$datum = $dagen_array[date("w")] .date(" j-m-Y")." at ".date("H:i");  
$insert = "INSERT INTO news_reactions (id,newsid,name,date,message,ip) 
VALUES ('','$rid','$naam','$datum','$bericht','$ip')";  

$query = mysql_query($insert);  

echo "Your comment has been posted, 
<a href=\"?id=read-comments&rid=$rid\">Click here</a> to read it...";  

}  
}  
else{  
$rid = $_GET['rid']; 
$select = "SELECT * FROM news WHERE id='$rid'";  
$query = mysql_query($select);  
$list = mysql_fetch_object($query);  

echo "Please fill out this form and click \"Send\" to reply on 
this news message: <b>$list->title</b>";  

echo "<form method=\"post\" action=\"?id=post-a-comment&rid=$rid\">";  

echo "Name:<br>";  
echo "<input type=\"text\" name=\"naam\" size=\"20\" maxlength=\"20\"><br>";  
echo "Comment:<br>";  
echo "<textarea name=\"bericht\" cols=\"35\" rows=\"12\"></textarea><br>";  
echo "<input type=\"submit\" name=\"submit\" value=\"Send\"> | 
<input type=\"reset\" name=\"reset\" value=\"Reset\">";  
echo "<br><br>";  
echo "<a href=\"index.html\" title=\"Go Home\">Home</a>";  

}  
?> 


include-system:
PHP:
1
2
3
4
5
6
7
8
9
10
11
 <?php
$StandaardExtensie = ".php";

if(!$id) { }
elseif(file_exists("$StandaardMap$id$StandaardExtensie")) {
echo"<table width=\"100%\" border=\"0\"><tr><td width=\"100%\" height=\"100%\">";
include("$StandaardMap$id$StandaardExtensie"); 
echo"</td></tr></table>";
}
else { echo("<br><br><strong><center><u>File doesn't excist!</u></center></strong>"); }
?> 

[ Voor 75% gewijzigd door Verwijderd op 12-08-2003 10:19 ]


  • whoami
  • Registratie: December 2000
  • Laatst online: 21-08 22:54
Lees eens de P&W Quickstart en FAQ.

P&W is geen forum waar je zomaar code kunt posten en verwahcten dat wij het voor je gaan debuggen en oplossen.

https://fgheysels.github.io/


Dit topic is gesloten.