הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   מה הבעיה בקוד הבא? (https://hosts.co.il/forums/showthread.php?t=43881)

Gold-System 19-04-07 03:28

מה הבעיה בקוד הבא?
 
PHP קוד:

<?php 
include "config.php";

$query mysql_query("SELECT * FROM `msg`");
while(@(
$con $mysql_fetch_array($query)))
{
$msg =  $con['Update'];
}
?>
<html>
<head>
<form method="POST">
<div align="center">
<textarea name="messege"><?php echo $msg?></textarea>
<input type="submit" value="עדכן תיבה">
</form>
</html>
<?
$id 
$_GET['id'];
$update $_POST['messege'];
$updateSQL "UPDATE `msg` SET `Update` = '$update' WHERE `id`='$id'";
mysql_query($updateSQL) or die(mysql_error());
?>

תודה |קורץ|

adi92 19-04-07 08:00

תן לנו את הקונפיג, ומה אתה מקבל דרך GET.

Meir 19-04-07 08:04

PHP קוד:

<?php 
include "config.php";

$query mysql_query("SELECT * FROM `msg`");
while(
$con = @mysql_fetch_array($query))
{
$msg =  $con['Update'];
}
?>
<html>
<head>
<form method="POST">
<div align="center">
<textarea name="messege"><?php echo $msg?></textarea>
<input type="submit" value="עדכן תיבה">
</form>
</html>
<?
$id 
$_GET['id'];
$update $_POST['messege'];
$updateSQL "UPDATE `msg` SET `Update` = '$update' WHERE `id`='$id'";
mysql_query($updateSQL) or die(mysql_error());
?>


Gold-System 19-04-07 12:29

http://www.goldsystem.co.il/Panel/messege.php
מאור,
זה לא משאיר בתיבה את מה שאני רושם..

Meir 19-04-07 12:35

ציטוט:

נכתב במקור על ידי Gold-System (פרסם 462355)
http://www.goldsystem.co.il/Panel/messege.php
מאור,
זה לא משאיר בתיבה את מה שאני רושם..

אתה לא שולח את הID של העידכון בעזרת הטופס...

Gold-System 19-04-07 12:38

אז איך עושים? תראה לי.


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

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