View Single Post
ישן 17-08-07, 00:01   # 1
inTouch
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Jan 2006
הודעות: 82

inTouch לא מחובר  

[PHP] קבלת נתונים מטופס HTML

היי,
יצרתי טופס HTML שאמור לשלוח נתונים לקובץ PHP. מופיע לי מסך לבן והECHO אינו מציג דבר.
קוד הHTML הוא:

HTML קוד:
<form action="index2.php" method="post">
Number 1: <input type = "text" name = "calculator [num1]"><BR />

Action [+, -, /, *]: <input type = "text" name = "calculator [action]" size=1 maxlength=1><BR />

Number 2: <input type = "text" name = "calculator [num2]"><BR />

<input type="submit" value="Go!">
</form>
הקובץ index2.php הוא:
PHP קוד:
<?php
$calculator1 
$_post ["calculator"] ['num1'];
echo 
$calculator1;
?>
כמו שאתם רואים, אני רוצה להציג רק את המשתנה num1 במערך calculator.
אני יודע שהמשתנה calculator1 אינו נחוץ, סתם ניסיתי דרך אחרת שגם לא פעלה.

תודה רבה לעוזרים .
  Reply With Quote