View Single Post
ישן 04-03-06, 14:57   # 17
Kuchi
הוסטסניון
 
Kuchi's Avatar
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: אור יהודה
גיל: 37
הודעות: 2,540
שלח הודעה באמצעות MSN אל Kuchi

Kuchi לא מחובר  

תעשה ככה נשמה !
PHP קוד:
<html dir="rtl"> 
<meta http-equiv='Content-Language' content='he'>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>שלח מאמר</title>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1255'>
 
<?php 

$title 
$_POST["title"]; 
$poster $_POST["poster"]; 
$text $_POST["text"]; 
$date date("d/m/Y - H:i:s"); 

if (
$_POST["posted"] == 1) { 
if(!
$title) { 
die(
"<script type=\"text/javascript\">window.alert(\"שגיאה: חובה לכתוב כותרת!\"); history.go (-1);</script>"); 

if(!
$poster) { 
die(
"<script type=\"text/javascript\">window.alert(\"שגיאה: חובה לציין את שם הכותב!\"); history.go (-1);</script>"); 

if(!
$text) { 
die(
"<script type=\"text/javascript\">window.alert(\"שגיאה: חובה לציין תוכן!\"); history.go (-1);</script>"); 
}

include 
"config.php";


mysql_query("INSERT INTO `topics` VALUES ('','$title','$poster','$text','$image','$date')") or die("שגיאה"); 

?> 
המאמר נשלח בהצלחה
<?php 
}
?> 
<body style="font-family: Arial">

<form action="post.php" method="post"> 
<input type="hidden" name="posted" value="1"> 
כותרת: <input type="text" name="title" size="20"><Br /> 
שמך: <input type="text" name="poster" size="20"><Br />
תמונה: <input type="text" name="image" size="20">&nbsp; <b><font size="2">(<a href="#" onClick="window.open('upload/upload.html','העלאת קבצים','scrollbars=no,location=no,status=no,height=130,width=400');" style="text-decoration: none">העלה</a>)</font></b><Br /> 
תוכן: <br /> 
<textarea cols=50 rows=10 name="text"></textarea><br /> 
<input type="submit" name="submit" value="פרסם מאמר"> 
</form>
</html>
  Reply With Quote