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

HOME > PHP > PHP Forum > รบกวนด้วยค่ะ ทำแบบประเมินออนไลน์ มันไม่เพิ่มข้อมูลลงดาต้าเบสค่ะ



 

รบกวนด้วยค่ะ ทำแบบประเมินออนไลน์ มันไม่เพิ่มข้อมูลลงดาต้าเบสค่ะ

 



Topic : 046034



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



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




ทำโปรเจ็คพัฒนาเว็บไซต์ แล้วอาจารย์ให้ทำแบบประเมินออนไลน์ค่ะ ทำเกี่ยวกับดาต้าเบสไม่ค่อยเป็นอ่ะค่ะ
แทรก php ลงใน dreamค่ะ ดูโค้ดหลายรอบแล้วไม่รู้ว่าผิดตรงไหน ไม่ error แต่ไม่ยอมเพิ่มข้อมูลลงดาต้าน่ะค่ะ ทำแบบสองหน้า หน้าแรกกรอกข้อมูล หน้าถัดไปแสดงผลว่า บันทึกแล้วหรือไม่บันทึก ค่ะ
ช่วยดูทีนะคะ ขอบคุณล่วงหน้าค่ะ

โค้ดหน้าแรกค่ะ
Code (PHP)
<p><span class="style11 style14 style20"><span class="style11 style14 style24">โปรดเลือกในช่องที่ตรงตามความคิดเห็นของท่าน</span></span></p>
          <p><span class="style11 style14 style20">ตอนที่ 1 ข้อมูลเบื้องต้น </span></p>
          <p class="style28">เพศ :
            <input type="radio" name="gender" id="gender2" value="ผู้ชาย" />
            ชาย
            <input type="radio" name="gender" id="gender2" value="ผู้หญิง" />
            หญิง<br />
            อายุ :
            <input name="age" type="text" id="age" size="5" maxlength="2" />
            ปี <br />
            ท่านเคยใช้งานโปรแกรม Endnote หรือไม่
            <input type="radio" name="use" id="use" value="เคยใช้" />
            เคยใช้
            <input type="radio" name="use" id="use" value="ไม่เคยใช้" />
            ไม่เคยใช้ <br />
            ในด้าน
            <input name="uses1" type="checkbox" id="uses1" value="การศึกษา" />
            การศึกษา
            <input name="uses2" type="checkbox" id="uses2" value="การทำงาน" />
            การทำงาน
            <input name="uses3" type="checkbox" id="uses3" />
            อื่นๆ 
            <input type="text" name="uses3" id="uses3" />
            </p>
          <p><span class="style21">ตอนที่ 2 แบบสอบถามความพึงพอใจในการใช้เว็บไซต์</span><br />
            <span class="style17">*ระดับคะแนน :: 1 = พอใจน้อยที่สุด2 = พอใจน้อย3 = พอใจปานกลาง4 = พอใจมาก5 = พอใจมากที่สุด*</span>                </p>
        </blockquote>
        </blockquote>
          <table width="770" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="21" class="style11"><u><span class="style29">์</span></u></td>
          <td height="21" colspan="2" class="style11"><u><span class="style29">ด้านข้อมูล/เนื้อหาเว็บไซต์</span></u></td>
          <td width="57" valign="bottom" class="style11">&nbsp;</td>
          <td width="56" valign="bottom" class="style11">&nbsp;</td>
          <td width="55" valign="bottom" class="style11">&nbsp;</td>
          <td width="54" valign="bottom" class="style11">&nbsp;</td>
          <td width="65" valign="bottom" class="style11">&nbsp;</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">1. เสียง</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td class="style28">1.1 ความคมชัดของเสียง</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundclear" id="soundclear2" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundclear" id="soundclear2" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundclear" id="soundclear2" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundclear" id="soundclear2" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundclear" id="soundclear2" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td class="style28">1.2 การใช้ภาษาที่เข้าใจง่ายของผู้บรรยาย</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundspeech" id="soundspeech2" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundspeech" id="soundspeech2" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundspeech" id="soundspeech2" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundspeech" id="soundspeech2" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundspeech" id="soundspeech2" value="5" />
            5</td>
        </tr>
        <tr>
          <td width="81" class="style28">&nbsp;</td>
          <td width="26" class="style28">&nbsp;</td>
          <td class="style28">1.3 ความต่อเนื่องในการบรรยาย</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundcontinue" id="soundcontinue2" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundcontinue" id="soundcontinue2" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundcontinue" id="soundcontinue2" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundcontinue" id="soundcontinue2" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundcontinue" id="soundcontinue2" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td width="376" class="style28">1.4 เสียงประกอบต่าง ๆ  (ที่ไม่ใช่เสียงผู้บรรยาย)</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundother" id="soundother2" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundother" id="soundother2" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundother" id="soundother2" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundother" id="soundother2" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundother" id="soundother2" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">2. ภาพวิดีโอ</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td width="376" class="style28">2.1 ความคมชัดของภาพ</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdoclear" id="vdoclear" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdoclear" id="vdoclear" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdoclear" id="vdoclear" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdoclear" id="vdoclear" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdoclear" id="vdoclear" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td class="style28">2.2 ความต่อเนื่องของภาพ</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdocontinue" id="vdocontinue" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdocontinue" id="vdocontinue" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdocontinue" id="vdocontinue" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdocontinue" id="vdocontinue" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdocontinue" id="vdocontinue" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td class="style28">2.3 ระยะเวลาในการดำเนินเรื่อง</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdotime" id="vdotime" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdotime" id="vdotime" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdotime" id="vdotime" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdotime" id="vdotime" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="vdotime" id="vdotime" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">3. ตัวอักษร</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td width="376" class="style28">3.1 แบบอักษรอ่านง่าย</td>
          <td valign="bottom" class="style28"><input type="radio" name="textfont" id="textfont" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="textfont" id="textfont" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="textfont" id="textfont" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="textfont" id="textfont" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="textfont" id="textfont" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td class="style28">3.2 ขนาดของตัวอักษร </td>
          <td valign="bottom" class="style28"><input type="radio" name="textsize" id="textsize" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="textsize" id="textsize" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="textsize" id="textsize" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="textsize" id="textsize" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="textsize" id="textsize" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td class="style28">3.3 สีของตัวอักษร</td>
          <td valign="bottom" class="style28"><input type="radio" name="textcolor" id="textcolor" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="textcolor" id="textcolor" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="textcolor" id="textcolor" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="textcolor" id="textcolor" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="textcolor" id="textcolor" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td class="style28">3.4 การใช้ภาษาที่เข้าใจง่าย</td>
          <td valign="bottom" class="style28"><input type="radio" name="textspeech" id="textspeech" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="textspeech" id="textspeech" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="textspeech" id="textspeech" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="textspeech" id="textspeech" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="textspeech" id="textspeech" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">4. ความสอดคล้องระหว่าง  ภาพและเนื้อหา</td>
          <td width="57" valign="bottom" class="style28"><input type="radio" name="picdetail" id="picdetail" value="1" />
            1</td>
          <td width="56" valign="bottom" class="style28"><input type="radio" name="picdetail" id="picdetail" value="2" />
            2</td>
          <td width="55" valign="bottom" class="style28"><input type="radio" name="picdetail" id="picdetail" value="3" />
            3</td>
          <td width="54" valign="bottom" class="style28"><input type="radio" name="picdetail" id="picdetail" value="4" />
            4</td>
          <td width="65" valign="bottom" class="style28"><input type="radio" name="picdetail" id="picdetail" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">5. ความสอดคล้องระหว่าง  การบรรยายและภาพวิดีโอ</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundvdo" id="soundvdo" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundvdo" id="soundvdo" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundvdo" id="soundvdo" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundvdo" id="soundvdo" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="soundvdo" id="soundvdo" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">6. เนื้อหาภายในเว็บไซต์ตรงกับความต้องการ</td>
          <td valign="bottom" class="style28"><input type="radio" name="detailwant" id="detailwant" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="detailwant" id="detailwant" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="detailwant" id="detailwant" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="detailwant" id="detailwant" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="detailwant" id="detailwant" value="5" />
            5</td>
        </tr>
        <tr>
          <td height="36" class="style28">&nbsp;</td>
          <td colspan="2" valign="top" class="style28">7. สามารถเป็นแหล่งความรู้ได้</td>
          <td valign="top" class="style28"><input type="radio" name="knowledge" id="knowledge" value="1" />
            1</td>
          <td valign="top" class="style28"><input type="radio" name="knowledge" id="knowledge" value="2" />
            2</td>
          <td valign="top" class="style28"><input type="radio" name="knowledge" id="knowledge" value="3" />
            3</td>
          <td valign="top" class="style28"><input type="radio" name="knowledge" id="knowledge" value="4" />
            4</td>
          <td valign="top" class="style28"><input type="radio" name="knowledge" id="knowledge" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28"><u class="style29">ด้านการออกแบบและจัดรูปแบบเว็บไซต์</u></td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">1. หน้าโฮมเพจมีความสวยงามน่าสนใจ</td>
          <td width="57" valign="bottom" class="style28"><input type="radio" name="homepage" id="homepage" value="1" />
            1</td>
          <td width="56" valign="bottom" class="style28"><input type="radio" name="homepage" id="homepage" value="2" />
            2</td>
          <td width="55" valign="bottom" class="style28"><input type="radio" name="homepage" id="homepage" value="3" />
            3</td>
          <td width="54" valign="bottom" class="style28"><input type="radio" name="homepage" id="homepage" value="4" />
            4</td>
          <td width="65" valign="bottom" class="style28"><input type="radio" name="homepage" id="homepage" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">2. การจัดรูปแบบโครงสร้างเว็บไซต์</td>
          <td valign="bottom" class="style28"><input type="radio" name="layout" id="layout" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="layout" id="layout" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="layout" id="layout" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="layout" id="layout" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="layout" id="layout" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">3. ความเหมาะสมของการใช้สี</td>
          <td valign="bottom" class="style28"><input type="radio" name="color" id="color" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="color" id="color" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="color" id="color" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="color" id="color" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="color" id="color" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">4. การวางตำแหน่งของสื่อต่าง  ๆ</td>
          <td valign="bottom" class="style28"><input type="radio" name="positionmedia" id="positionmedia" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="positionmedia" id="positionmedia" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="positionmedia" id="positionmedia" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="positionmedia" id="positionmedia" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="positionmedia" id="positionmedia" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">5. 
            การวางตำแหน่งเมนู และสัญลักษณ์ในการนำทาง<span class="style14">ต่างๆ</span></td>
          <td valign="bottom" class="style28"><input type="radio" name="positionmanu" id="positionmanu" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="positionmanu" id="positionmanu" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="positionmanu" id="positionmanu" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="positionmanu" id="positionmanu" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="positionmanu" id="positionmanu" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">6. การออกแบบปุ่ม ไอคอนต่าง  ๆ</td>
          <td width="57" valign="bottom" class="style28"><input type="radio" name="positionbutton" id="positionbutton" value="1" />
            1</td>
          <td width="56" valign="bottom" class="style28"><input type="radio" name="positionbutton" id="positionbutton2" value="2" />
            2</td>
          <td width="55" valign="bottom" class="style28"><input type="radio" name="positionbutton" id="positionbutton" value="3" />
            3</td>
          <td width="54" valign="bottom" class="style28"><input type="radio" name="positionbutton" id="positionbutton" value="4" />
            4</td>
          <td width="65" valign="bottom" class="style28"><input type="radio" name="positionbutton" id="positionbutton" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">7. ความละเอียดของ Site Map</td>
          <td valign="bottom" class="style28"><input type="radio" name="sitemap" id="sitemap" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="sitemap" id="sitemap" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="sitemap" id="sitemap" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="sitemap" id="sitemap" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="sitemap" id="sitemap" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">8. ความถูกต้องในการเชื่อมโยงหน้าเว็บเพจ</td>
          <td valign="bottom" class="style28"><input type="radio" name="linkwebpage" id="linkwebsite" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="linkwebpage" id="linkwebsite" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="linkwebpage" id="linkwebsite" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="linkwebpage" id="linkwebsite" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="linkwebpage" id="linkwebsite" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">9. ความถูกต้องในการเชื่อมโยงไปยังเว็บไซต์อื่น</td>
          <td valign="bottom" class="style28"><input type="radio" name="linkwebsite" id="linkwebsite2" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="linkwebsite" id="linkwebsite" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="linkwebsite" id="linkwebsite" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="linkwebsite" id="linkwebsite" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="linkwebsite" id="linkwebsite" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td colspan="2" class="style28">10. การจัดหมวดหมู่ของเนื้อหาที่ง่ายต่อการค้นหา</td>
          <td valign="bottom" class="style28"><input type="radio" name="category" id="category" value="1" />
            1</td>
          <td valign="bottom" class="style28"><input type="radio" name="category" id="category" value="2" />
            2</td>
          <td valign="bottom" class="style28"><input type="radio" name="category" id="category" value="3" />
            3</td>
          <td valign="bottom" class="style28"><input type="radio" name="category" id="category" value="4" />
            4</td>
          <td valign="bottom" class="style28"><input type="radio" name="category" id="category" value="5" />
            5</td>
        </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
        </tr>
        <tr>
          <td height="32" class="style28">&nbsp;</td>
          <td colspan="2" valign="top" class="style28"><span class="style11 style14 style20">ตอนที่ 3 ข้อเสนอแนะ</span></td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
        </tr>
        <tr>
          <td height="79" class="style28">&nbsp;</td>
          <td colspan="7" class="style28">            <div align="center"> <br />
            <textarea name="present" cols="100" rows="4" class="style28" id="present"></textarea>
              <br />
              <br />
          </div></td>
          </tr>
        <tr>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td class="style28">&nbsp;</td>
          <td valign="bottom" class="style28">&nbsp;</td>
          <td colspan="2" valign="bottom" class="style28"><div align="center">
            <input type="submit" name="submit" id="submit" value="ตกลง" />
          </div></td>
          <td colspan="2" valign="bottom" class="style28"><div align="center">
            <input type="reset" name="button2" id="button2" value="ยกเลิก" />
          </div></td>
          </tr>
      </table>
      </form>
            <blockquote>
        <blockquote>
          <p>

        </p>
 <?
 $host="127.0.0.1";
 $user="root";
 $passwd="1234";
 $dbname="asses";
 mysql_connect($host, $user,$passwd) or die("ติดต่อ Host ไม่ได้");
 mysql_select_db($dbname) or die("ติดต่อฐานข้อมูลไม่ได้");
 $sql="select * from save";
 $sqlquery=mysql_db_query($dbname, $sql);
 print"คุณเป็นคนที่ ".$idasses."<br>";
 print"จำนวนผู้ทำแบบประเมินทั้งหมด ".mysql_num_rows($sqlquery)." คน";
 mysql_close();
 ?>


โค้ดหน้า2 ค่ะ

Code (PHP)
<?
$host="127.0.0.1";
$user="root";
$passwd="1234";
$dbname="asses";
mysql_connect($host,$user,$passwd) or die("ติดต่อ Host ไม่ได้");
mysql_select_db($dbname) or die("ติดต่อฐานข้อมูลไม่ได้");

$idasses=$_POST['idasses'];
$gender=$_POST['gender'];
$age=$_POST['age'];
$use=$_POST['use'];
$uses1=$_POST['uses1'];
$uses2=$_POST['uses2'];
$uses3=$_POST['uses3'];
$soundclear=$_POST['soundclear'];
$soundspeech=$_POST['soundspeech'];
$soundcontinue=$_POST['soundcontinue'];
$soundother=$_POST['soundother'];
$vdoclear=$_POST['vdoclear'];
$vdocontinue=$_POST['vdocontinue'];
$vdotime=$_POST['vdotime'];
$textfont=$_POST['textfont'];
$textsize=$_POST['textsize'];
$textcolor=$_POST['textcolor'];
$textspeech=$_POST['textspeech'];
$picdetail=$_POST['picdetail'];
$soundvdo=$_POST['soundvdo'];
$detailwant=$_POST['detailwant'];
$knowledge=$_POST['knowledge'];
$homepage=$_POST['homepage'];
$layout=$_POST['layout'];
$color=$_POST['color'];
$positionmedia=$_POST['positionmedia'];
$positionmanu=$_POST['positianmanu'];
$positionbutton=$_POST['positionmanu'];
$sitemap=$_POST['sitemap'];
$linkwebsite=$_POST['linkwebsite'];
$linkwebpage=$_POST['linkwebpage'];
$category=$_POST['category'];
$present=$_POST['present'];

$sql = "insert into save values ($idasses, '$gender', '$age', '$use', '$uses1', '$uses2', '$uses3', '$soundclear',
 '$soundspeech', '$soundcontinue', '$soundother', '$vdoclear', '$vdocontinue', '$vdotime', '$textfont', '$textsize',
 '$textcolor', '$textspeech', '$picdetail', '$soundvdo', '$detailwant', '$knowledge', '$homepage', '$layout',
 '$color', '$positionmedia', '$positionmanu', '$positionbutton', '$sitemap', '$linkwebsite', '$linkwebpage', '$category', '$present')";

$sqlquery=mysql_db_query($dbname,$sql);
if($sqlquery)
{
print"<br><font color=#FF0000>จัดเก็บข้อมูลเรียบร้อยแล้ว</font><br>";
print"<A HREF=\"index.php\">กลับไปที่หน้าแรก</A>";
}
else{
print"<br><font color=#FF0000>บันทึกข้อมูลผิดพลาด กรุณากรอกแบบประเมินอีกครั้ง</font><br>";
print"<A HREF=\"asses.php\">กลับไปหน้าแบบประเมิน</A>";
}

mysql_close();
?>


นี่เป็นดาต้าเบสจาก mysql , copy จาก notepad หลัง export ออกมาค่ะ
Code
CREATE TABLE `save` (
`idasses` int(5) NOT NULL auto_increment,
`gender` varchar(10) collate utf8_unicode_ci NOT NULL,
`age` varchar(10) collate utf8_unicode_ci NOT NULL,
`use` varchar(20) collate utf8_unicode_ci NOT NULL,
`uses1` varchar(50) collate utf8_unicode_ci default NULL,
`uses2` varchar(50) collate utf8_unicode_ci default NULL,
`uses3` varchar(50) collate utf8_unicode_ci default NULL,
`soundclear` int(5) NOT NULL,
`soundspeech` int(5) NOT NULL,
`soundcontinue` int(5) NOT NULL,
`soundother` int(5) NOT NULL,
`vdoclear` int(5) NOT NULL,
`vdocontinue` int(5) NOT NULL,
`vdotime` int(5) NOT NULL,
`textfont` int(5) NOT NULL,
`textsize` int(5) NOT NULL,
`textcolor` int(5) NOT NULL,
`textspeech` int(5) NOT NULL,
`picdetail` int(5) NOT NULL,
`soundvdo` int(5) NOT NULL,
`detailwant` int(5) NOT NULL,
`knowledge` int(5) NOT NULL,
`homepage` int(5) NOT NULL,
`layout` int(5) NOT NULL,
`color` int(5) NOT NULL,
`positionmedia` int(5) NOT NULL,
`positionmanu` int(5) NOT NULL,
`positionbutton` int(5) NOT NULL,
`sitemap` int(5) NOT NULL,
`linkwebsite` int(5) NOT NULL,
`linkwebpage` int(5) NOT NULL,
`category` int(5) NOT NULL,
`present` varchar(500) collate utf8_unicode_ci default NULL,
PRIMARY KEY (`idasses`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;




Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2010-07-27 13:38:22 By : goong View : 1242 Reply : 5
 

 

No. 1



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



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


$positionmanu=$_POST['positianmanu']; != $positionmanu'






Date : 2010-07-27 13:45:35 By : Mr.Poo
 


 

No. 2



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



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


ขอบคุณ Mr.Poo แก้ตามแล้ว ยังเพิ่มข้อมูลไม่ได้เลยค่ะ

$positionbutton=$_POST['positionmanu']; ตรงนี้ก็แก้แล้วค่ะ ยังไม่ได้เลย ช่วยด้วยค่ะ T^T
Date : 2010-07-27 13:48:31 By : gamgoong
 

 

No. 3



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



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

กรณี insert ลงฐานข้อมูลถ้า pk เป็น auto เวลาเขียนcode insert ไม่ต้องใส่ชื่อของpkตัวนั้นเพราะฐานมานauto id ออกมาอยู่แล้วค่ะ

แล้วถ้าinsertไม่ได้อีกลองไม่ต้องผ่านformลองinsert sql ลงไปตรงๆที่DBเลย

ถ้าไม่ได้อีกลองเอาerrorมาให้ดูหน่อยละกานนะค่ะ
Date : 2010-07-27 14:00:49 By : LuckyStar
 


 

No. 4



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

สมาชิกที่ใส่เสื้อไทยครีเอท

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


Code (PHP)
<?
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("mydatabase");
$strSQL = "INSERT INTO customer ";
$strSQL .="(CustomerID,Name,Email,CountryCode,Budget,Used) ";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["txtCustomerID"]."','".$_POST["txtName"]."','".$_POST["txtEmail"]."' ";
$strSQL .=",'".$_POST["txtCountryCode"]."','".$_POST["txtBudget"]."','".$_POST["txtUsed"]."') ";
$objQuery = mysql_query($strSQL);
if($objQuery)
{
	echo "Save Done.";
}
else
{
	echo "Error Save [".$strSQL."]";
}
mysql_close($objConnect);
?>


Ref : PHP MySQL Add/Insert Record
ลองดูเป็นตัวอย่างในการ insert data ลง db นะครับจะได้ง่ายต่อการตรวจสอบของตัวเองด้วย

หรือไม่ก็ลอง
Code (PHP)
echo $sqlquery; // ดูว่าได้อะไรออกมาบ้างนะครับ

Date : 2010-07-27 14:02:39 By : pokultra
 


 

No. 5



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



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


ขอบคุณ คุณ Luckystar และคุณ Rastafari ค่ะ เดี๋ยวลองทำดู แต่ละวิธี ได้ไม่ได้ยังไง เดี๋ยวเข้ามาถามอีกที ขอบคุณค้า
Date : 2010-07-27 14:14:35 By : gamgoong
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : รบกวนด้วยค่ะ ทำแบบประเมินออนไลน์ มันไม่เพิ่มข้อมูลลงดาต้าเบสค่ะ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 05
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 อัตราราคา คลิกที่นี่