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,028

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



 

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

 



Topic : 077344



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



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




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


code
echo '<form name="form1" method="post" action="?do=register">
<h1>Registration</h1>
<table width="584" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="136" height="25"><strong>Username</strong></td>
      <td width="202" height="25"><label>
        <input name="r_username" type="text" class="fixedloginform" id="r_username" maxlength="20">
      </label></td>
      <td width="246">&nbsp;</td>
    </tr>
    <tr>
      <td height="25"><strong>Password</strong></td>
      <td height="25"><input name="r_password" type="password" class="fixedloginform" id="r_password" maxlength="30"></td>
      <td rowspan="2"><div align="right"><img src="captcha/captcha.php"></div></td>
    </tr>
    <tr>
      <td height="25"><strong>Password Confirm </strong></td>
      <td height="25"><input name="r_password2" type="password" class="fixedloginform" id="r_password2" maxlength="30"></td>
    </tr>
    <tr>
      <td height="25"><strong>Email</strong></td>
      <td height="25"><input name="r_email" type="text" class="fixedloginform" id="r_email" maxlength="255"></td>
      <td><div align="right">
        <label>
        <input name="r_code" type="text" id="r_code" class="fixedloginform">
        </label>
      </div></td>
    </tr>
    <tr>
      <td height="25"><strong>Type</strong></td>
      <td height="25"><label>
        <select name="r_type" id="r_type" onChange="javascript:docheckmem();">
		<option value="0">กรุณาเลือก</option>
		<?php
		mysql_query("SET NAMES UTF8");
		$memsql = mysql_query("SELECT * FROM `member_type` ORDER BY `id` ASC;");
		while($memrow = mysql_fetch_array($memsql))
		{
		if($memrow['quota'] == -1)
			{
			$quota = "ไม่จำกัด";
			}else{
			$quota = $memrow['quota'];
			}
		echo "<option value=\"".$memrow['id']."\">".$memrow['name']."</option>";
		}
		?>
        </select>
      </label></td>
      <td>&nbsp;</td>
    </tr>

    <tr>
      <td height="25" align="center"><label></label></td>
      <td height="25" colspan="2" align="center"><div id="info"></div></td>
    </tr>
    <tr>
      <td height="25" colspan="3" align="center"><input name="Button3" type="button" class="loginbutton" onClick="JavaScript:doregister();" value="Register"></td>
    </tr>
  </table>
</form>
<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 : 959 Reply : 2
 

 

No. 1



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



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


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


Code (PHP)
<?php
echo '<form name="form1" method="post" action="?do=register">
<h1>Registration</h1>
<table width="584" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="136" height="25"><strong>Username</strong></td>
      <td width="202" height="25"><label>
        <input name="r_username" type="text" class="fixedloginform" id="r_username" maxlength="20">
      </label></td>
      <td width="246">&nbsp;</td>
    </tr>
    <tr>
      <td height="25"><strong>Password</strong></td>
      <td height="25"><input name="r_password" type="password" class="fixedloginform" id="r_password" maxlength="30"></td>
      <td rowspan="2"><div align="right"><img src="captcha/captcha.php"></div></td>
    </tr>
    <tr>
      <td height="25"><strong>Password Confirm </strong></td>
      <td height="25"><input name="r_password2" type="password" class="fixedloginform" id="r_password2" maxlength="30"></td>
    </tr>
    <tr>
      <td height="25"><strong>Email</strong></td>
      <td height="25"><input name="r_email" type="text" class="fixedloginform" id="r_email" maxlength="255"></td>
      <td><div align="right">
        <label>
        <input name="r_code" type="text" id="r_code" class="fixedloginform">
        </label>
      </div></td>
    </tr>
    <tr>
      <td height="25"><strong>Type</strong></td>
      <td height="25"><label>
        <select name="r_type" id="r_type" onChange="javascript:docheckmem();">
		<option value="0">กรุณาเลือก</option>
';

		mysql_query("SET NAMES UTF8");
		$memsql = mysql_query("SELECT * FROM `member_type` ORDER BY `id` ASC;");
		while($memrow = mysql_fetch_array($memsql))
		{
		if($memrow['quota'] == -1)
			{
			$quota = "ไม่จำกัด";
			}else{
			$quota = $memrow['quota'];
			}
		echo "<option value=\"".$memrow['id']."\">".$memrow['name']."</option>";
		}

echo'
        </select>
      </label></td>
      <td>&nbsp;</td>
    </tr>

    <tr>
      <td height="25" align="center"><label></label></td>
      <td height="25" colspan="2" align="center"><div id="info"></div></td>
    </tr>
    <tr>
      <td height="25" colspan="3" align="center"><input name="Button3" type="button" class="loginbutton" onClick="JavaScript:doregister();" value="Register"></td>
    </tr>
  </table>
</form>
<h1>';
?>









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


 

No. 2



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



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


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

Code (PHP)
<?php
echo '<form name="form1" method="post" action="?do=register">
<h1>Registration</h1>
<table width="584" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="136" height="25"><strong>Username</strong></td>
<td width="202" height="25"><label>
<input name="r_username" type="text" class="fixedloginform" id="r_username" maxlength="20">
</label></td>
<td width="246">&nbsp;</td>
</tr>
<tr>
<td height="25"><strong>Password</strong></td>
<td height="25"><input name="r_password" type="password" class="fixedloginform" id="r_password" maxlength="30"></td>
<td rowspan="2"><div align="right"><img src="captcha/captcha.php"></div></td>
</tr>
<tr>
<td height="25"><strong>Password Confirm </strong></td>
<td height="25"><input name="r_password2" type="password" class="fixedloginform" id="r_password2" maxlength="30"></td>
</tr>
<tr>
<td height="25"><strong>Email</strong></td>
<td height="25"><input name="r_email" type="text" class="fixedloginform" id="r_email" maxlength="255"></td>
<td><div align="right">
<label>
<input name="r_code" type="text" id="r_code" class="fixedloginform">
</label>
</div></td>
</tr>
<tr>
<td height="25"><strong>Type</strong></td>
<td height="25"><label>
<select name="r_type" id="r_type" onChange="javascript:docheckmem();">
<option value="0">กรุณาเลือก</option>
';

mysql_query("SET NAMES UTF8");
$memsql = mysql_query("SELECT * FROM `member_type` ORDER BY `id` ASC;");
while($memrow = mysql_fetch_array($memsql))
{
if($memrow['quota'] == -1)
{
$quota = "ไม่จำกัด";
}else{
$quota = $memrow['quota'];
}
echo "<option value=\"".$memrow['id']."\">".$memrow['name']."</option>";
}

echo'
</select>
</label></td>
<td>&nbsp;</td>
</tr>

<tr>
<td height="25" align="center"><label></label></td>
<td height="25" colspan="2" align="center"><div id="info"></div></td>
</tr>
<tr>
<td height="25" colspan="3" align="center"><input name="Button3" type="button" class="loginbutton" onClick="JavaScript:doregister();" value="Register"></td>
</tr>
</table>
</form>
<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 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

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