הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 18-01-09, 22:48   # 4
Erez | TrustMedia.co.il
עסק רשום [?]
 
מיני פרופיל
תאריך הצטרפות: Jul 2008
הודעות: 1,854

Erez | TrustMedia.co.il לא מחובר  

PHP קוד:
if ($_GET['id']) {
  
$id $_GET['id'];
$query "SELECT * FROM table WHERE id='$id'";
$result mysql_query($query)
    or die(
"Query failed: " mysql_error());
while (
$row mysql_fetch_array($result)) {
$id $row['id'];
$title $row['title'];
$news $row['news'];
  echo 
"<form action='?id=update&$id' method='post'>";
  echo 
"<input type='text' name='title' size='70' maxlength='50' value=\"$title\"> &nbsp; <input type='submit' name='button' value='שלח'>
        <br /><textarea rows='10' cols='100' name='news' onPaste='return checkArea(this)' onKeyPress='return checkArea(this)' onKeyUp='totalChars.innerText=this.value.length'>$news</textarea>
<br />
<span id=totalChars>0</span> מתוך 500 תווים"
;
  echo 
"</form>";
}
}

else if (
$_GET['id'] == "update&$id") {
$title $_POST['title'];
$news $_POST['news'];
$title htmlspecialchars($title);
$news htmlspecialchars($news);
$query "UPDATE table SET title='$title' , news='$news' WHERE id='$id'";
$result mysql_query($query)
    or die(
"Query failed: ".mysql_error());
echo 
"<meta http-equiv=\"refresh\" content=\"0;url='$url'\" />";

__________________
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 


חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 20:25.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ