Jump to content
Sign in to follow this  
TOYSЯUS

Masalah Php Form

Recommended Posts

Assalamualaikum..

Minta tolong carikan apa masalah dengan coding saya ni..
Pueh den pikir.

Form punya coding:
[code]<form name="Form1" method="post" action="confirm.php" enctype="text/plain" id="Form1">
<table>
<tr><td colspan=2><b>Please complete all fields below.</b></td></tr>
<tr><td>Full Name:</td><td><input type="text" name="fname" maxlength="13"></td></tr>
<tr><td>Address:</td><td><input type="text" id="address" name="address" maxlength="13"></td></tr>
<tr><td>City:</td><td><input type="text" id="city" name="city" maxlength="13"></td></tr>
<tr><td>State:</td><td><select name="state" size="1">
<option value="null">--SELECT--</option>
<option value="Johor">Johor</option>
<option value="Kedah">Kedah</option>
<option value="Kelantan">Kelantan</option>
<option value="Melaka">Melaka</option>
<option value="Negeri Sembilan">Negeri Sembilan</option>
<option value="Pahang">Pahang</option>
<option value="Perak">Perak</option>
<option value="Perlis">Perlis</option>
<option value="Pulau Pinang">Pulau Pinang</option>
<option value="Sabah">Sabah</option>
<option value="Sarawak">Sarawak</option>
<option value="Selangor">Selangor</option>
<option value="Terengganu">Terengganu</option>
<option value="Wilayah Persekutuan – Kuala Lumpur">Wilayah Persekutuan – Kuala Lumpur</option>
<option value="Wilayah Persekutuan – Putrajaya">Wilayah Persekutuan – Putrajaya</option>
<option value="Wilayah Persekutuan – Labuan">Wilayah Persekutuan – Labuan</option>
</select>
</td></tr>
<tr><td>Telephone:</td><td><input type="text" id="telephone" name="telephone" maxlength="13"></td></tr>
<tr><td>Username:</td><td><input type="text" id="uname" name="uname" maxlength="13"></td></tr>
<tr><td>Password:</td><td><input type="password" id="password" name="password" ></td></tr>
</table>
<button id="register" type="submit" name="submit" value="submit">Register</font></button>
<button id="reset" type="reset" name="reset" value="reset">Reset</font></button>
</form>[/code]

confirm.php punya coding (mmg cmni sbb blum siap):
[code] <?php

include 'dbconnect.php';

echo $_POST["fname"];
echo $_POST["uname"];
echo $_POST["address"];
echo $_POST["city"];
echo $_POST["state"];
echo $_POST["telephone"];
echo $_POST["password"];

echo"<br>Are you sure the information is correct?";

?>[/code]

Notice selepas click Submit pada form
[quote]Connected to database
Notice: Undefined index: fname in C:\Program Files (x86)\EasyPHP-5.3.3\www\CCMS\customer\confirm.php on line 5

Notice: Undefined index: uname in C:\Program Files (x86)\EasyPHP-5.3.3\www\CCMS\customer\confirm.php on line 6

Notice: Undefined index: address in C:\Program Files (x86)\EasyPHP-5.3.3\www\CCMS\customer\confirm.php on line 7

Notice: Undefined index: city in C:\Program Files (x86)\EasyPHP-5.3.3\www\CCMS\customer\confirm.php on line 8

Notice: Undefined index: state in C:\Program Files (x86)\EasyPHP-5.3.3\www\CCMS\customer\confirm.php on line 9

Notice: Undefined index: telephone in C:\Program Files (x86)\EasyPHP-5.3.3\www\CCMS\customer\confirm.php on line 10

Notice: Undefined index: password in C:\Program Files (x86)\EasyPHP-5.3.3\www\CCMS\customer\confirm.php on line 11

Are you sure the information is correct?[/quote]

Jadi, benda yg saya nak paparkan pun tak keluar...
Kenapa yer? :(

Terima kasih.

Share this post


Link to post
Share on other sites
Wokeh takpe, dah settle seara T&E.
Saye adjust line pertama form menjadi
[code]<form name="Form1" method="post" action="confirm.php">[/code]

TQ.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...