Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,038

HOME > PHP > PHP Forum > echo ยังไงไม่ให้ error ครับผม มีโค้ด ลองทำแล้วไม่ได้เลยครับ


[PHP] echo ยังไงไม่ให้ error ครับผม มีโค้ด ลองทำแล้วไม่ได้เลยครับ

 
Topic : 077344



โพสกระทู้ ( 73 )
บทความ ( 0 )



สถานะออฟไลน์



ผมลองดูแล้วแต่ก็ยังไม่เข้าใจ ใน echo เท่าไหร่เพราะว่ามี คำสั่ง sql มาด้วย


code
01.echo '<form name="form1" method="post" action="?do=register">
02.<h1>Registration</h1>
03.<table width="584" border="0" align="center" cellpadding="0" cellspacing="0">
04.    <tr>
05.      <td width="136" height="25"><strong>Username</strong></td>
06.      <td width="202" height="25"><label>
07.        <input name="r_username" type="text" class="fixedloginform" id="r_username" maxlength="20">
08.      </label></td>
09.      <td width="246">&nbsp;</td>
10.    </tr>
11.    <tr>
12.      <td height="25"><strong>Password</strong></td>
13.      <td height="25"><input name="r_password" type="password" class="fixedloginform" id="r_password" maxlength="30"></td>
14.      <td rowspan="2"><div align="right"><img src="captcha/captcha.php"></div></td>
15.    </tr>
16.    <tr>
17.      <td height="25"><strong>Password Confirm </strong></td>
18.      <td height="25"><input name="r_password2" type="password" class="fixedloginform" id="r_password2" maxlength="30"></td>
19.    </tr>
20.    <tr>
21.      <td height="25"><strong>Email</strong></td>
22.      <td height="25"><input name="r_email" type="text" class="fixedloginform" id="r_email" maxlength="255"></td>
23.      <td><div align="right">
24.        <label>
25.        <input name="r_code" type="text" id="r_code" class="fixedloginform">
26.        </label>
27.      </div></td>
28.    </tr>
29.    <tr>
30.      <td height="25"><strong>Type</strong></td>
31.      <td height="25"><label>
32.        <select name="r_type" id="r_type" onChange="javascript:docheckmem();">
33.        <option value="0">กรุณาเลือก</option>
34.        <?php
35.        mysql_query("SET NAMES UTF8");
36.        $memsql = mysql_query("SELECT * FROM `member_type` ORDER BY `id` ASC;");
37.        while($memrow = mysql_fetch_array($memsql))
38.        {
39.        if($memrow['quota'] == -1)
40.            {
41.            $quota = "ไม่จำกัด";
42.            }else{
43.            $quota = $memrow['quota'];
44.            }
45.        echo "<option value=\"".$memrow['id']."\">".$memrow['name']."</option>";
46.        }
47.        ?>
48.        </select>
49.      </label></td>
50.      <td>&nbsp;</td>
51.    </tr>
52. 
53.    <tr>
54.      <td height="25" align="center"><label></label></td>
55.      <td height="25" colspan="2" align="center"><div id="info"></div></td>
56.    </tr>
57.    <tr>
58.      <td height="25" colspan="3" align="center"><input name="Button3" type="button" class="loginbutton" onClick="JavaScript:doregister();" value="Register"></td>
59.    </tr>
60.  </table>
61.</form>
62.<h1>';




Tag : PHP



ประวัติการแก้ไข
2012-04-21 13:01:57
Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2012-04-21 13:00:50 By : DiiGO View : 1022 Reply : 2
 

 

No. 1



โพสกระทู้ ( 3 )
บทความ ( 0 )



สถานะออฟไลน์


แก้ให้แล้วนะครับ ลองสังเกตุดูเองล่ะ (^_^)


Code (PHP)
01.<?php
02.echo '<form name="form1" method="post" action="?do=register">
03.<h1>Registration</h1>
04.<table width="584" border="0" align="center" cellpadding="0" cellspacing="0">
05.    <tr>
06.      <td width="136" height="25"><strong>Username</strong></td>
07.      <td width="202" height="25"><label>
08.        <input name="r_username" type="text" class="fixedloginform" id="r_username" maxlength="20">
09.      </label></td>
10.      <td width="246">&nbsp;</td>
11.    </tr>
12.    <tr>
13.      <td height="25"><strong>Password</strong></td>
14.      <td height="25"><input name="r_password" type="password" class="fixedloginform" id="r_password" maxlength="30"></td>
15.      <td rowspan="2"><div align="right"><img src="captcha/captcha.php"></div></td>
16.    </tr>
17.    <tr>
18.      <td height="25"><strong>Password Confirm </strong></td>
19.      <td height="25"><input name="r_password2" type="password" class="fixedloginform" id="r_password2" maxlength="30"></td>
20.    </tr>
21.    <tr>
22.      <td height="25"><strong>Email</strong></td>
23.      <td height="25"><input name="r_email" type="text" class="fixedloginform" id="r_email" maxlength="255"></td>
24.      <td><div align="right">
25.        <label>
26.        <input name="r_code" type="text" id="r_code" class="fixedloginform">
27.        </label>
28.      </div></td>
29.    </tr>
30.    <tr>
31.      <td height="25"><strong>Type</strong></td>
32.      <td height="25"><label>
33.        <select name="r_type" id="r_type" onChange="javascript:docheckmem();">
34.        <option value="0">กรุณาเลือก</option>
35.';
36. 
37.        mysql_query("SET NAMES UTF8");
38.        $memsql = mysql_query("SELECT * FROM `member_type` ORDER BY `id` ASC;");
39.        while($memrow = mysql_fetch_array($memsql))
40.        {
41.        if($memrow['quota'] == -1)
42.            {
43.            $quota = "ไม่จำกัด";
44.            }else{
45.            $quota = $memrow['quota'];
46.            }
47.        echo "<option value=\"".$memrow['id']."\">".$memrow['name']."</option>";
48.        }
49. 
50.echo'
51.        </select>
52.      </label></td>
53.      <td>&nbsp;</td>
54.    </tr>
55. 
56.    <tr>
57.      <td height="25" align="center"><label></label></td>
58.      <td height="25" colspan="2" align="center"><div id="info"></div></td>
59.    </tr>
60.    <tr>
61.      <td height="25" colspan="3" align="center"><input name="Button3" type="button" class="loginbutton" onClick="JavaScript:doregister();" value="Register"></td>
62.    </tr>
63.  </table>
64.</form>
65.<h1>';
66.?>



ประวัติการแก้ไข
2012-04-21 13:15:01
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-04-21 13:09:26 By : dootertam
 

 

No. 2



โพสกระทู้ ( 73 )
บทความ ( 0 )



สถานะออฟไลน์


ขอบคุณมากครับ ได้แล้วครับ

Code (PHP)
01.<?php
02.echo '<form name="form1" method="post" action="?do=register">
03.<h1>Registration</h1>
04.<table width="584" border="0" align="center" cellpadding="0" cellspacing="0">
05.<tr>
06.<td width="136" height="25"><strong>Username</strong></td>
07.<td width="202" height="25"><label>
08.<input name="r_username" type="text" class="fixedloginform" id="r_username" maxlength="20">
09.</label></td>
10.<td width="246">&nbsp;</td>
11.</tr>
12.<tr>
13.<td height="25"><strong>Password</strong></td>
14.<td height="25"><input name="r_password" type="password" class="fixedloginform" id="r_password" maxlength="30"></td>
15.<td rowspan="2"><div align="right"><img src="captcha/captcha.php"></div></td>
16.</tr>
17.<tr>
18.<td height="25"><strong>Password Confirm </strong></td>
19.<td height="25"><input name="r_password2" type="password" class="fixedloginform" id="r_password2" maxlength="30"></td>
20.</tr>
21.<tr>
22.<td height="25"><strong>Email</strong></td>
23.<td height="25"><input name="r_email" type="text" class="fixedloginform" id="r_email" maxlength="255"></td>
24.<td><div align="right">
25.<label>
26.<input name="r_code" type="text" id="r_code" class="fixedloginform">
27.</label>
28.</div></td>
29.</tr>
30.<tr>
31.<td height="25"><strong>Type</strong></td>
32.<td height="25"><label>
33.<select name="r_type" id="r_type" onChange="javascript:docheckmem();">
34.<option value="0">กรุณาเลือก</option>
35.';
36. 
37.mysql_query("SET NAMES UTF8");
38.$memsql = mysql_query("SELECT * FROM `member_type` ORDER BY `id` ASC;");
39.while($memrow = mysql_fetch_array($memsql))
40.{
41.if($memrow['quota'] == -1)
42.{
43.$quota = "ไม่จำกัด";
44.}else{
45.$quota = $memrow['quota'];
46.}
47.echo "<option value=\"".$memrow['id']."\">".$memrow['name']."</option>";
48.}
49. 
50.echo'
51.</select>
52.</label></td>
53.<td>&nbsp;</td>
54.</tr>
55. 
56.<tr>
57.<td height="25" align="center"><label></label></td>
58.<td height="25" colspan="2" align="center"><div id="info"></div></td>
59.</tr>
60.<tr>
61.<td height="25" colspan="3" align="center"><input name="Button3" type="button" class="loginbutton" onClick="JavaScript:doregister();" value="Register"></td>
62.</tr>
63.</table>
64.</form>
65.<h1>';


อ๋อ เค้าทำกันอย่างนี้นี่ เอง !!


ประวัติการแก้ไข
2012-04-21 13:12:33
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2012-04-21 13:12:01 By : DiiGO
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : echo ยังไงไม่ให้ error ครับผม มีโค้ด ลองทำแล้วไม่ได้เลยครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)





ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2025 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่