Status
Not open for further replies.
Create the form and show your code here.


My Form Code:
PHP:
    <div class="toggle_container">
                        <div class="block">
                            <form>
                                <center><b><h7>Vendor Service Request</h7></b></center>
                                
                                <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label class="hospitalname">Hospital Name</label>
                                            <div>
                                                <input type="text" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Ref No.</label>
                                            <div>
                                            
                                                <input type="text" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                                
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>From</label>
                                            <div>
                                                <input type="text" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Description</label>
                                            <div>
                                            
                                                <input type="text" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                      
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>Designation</label>
                                            <div>
                                                <input type="text" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Manufacture</label>
                                            <div>
                                            
                                                <input type="text" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                      
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>Tel Number</label>
                                            <div>
                                                <input type="text" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Models</label>
                                            <div>
                                            
                                                <input type="text" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                      
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>Mobile Number</label>
                                            <div>
                                                <input type="text" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Serial numbers</label>
                                            <div>
                                            
                                                <input type="text" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                                
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>Fax</label>
                                            <div>
                                                <input type="text" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Equipment</label>
                                            <div>
                                            
                                                <input type="text" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                      
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>Email address</label>
                                            <div>
                                                <input type="text" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label class="attachment">Attachement</label>
                                            <div>
                                            
                                                <input type="file" id="fileupload2" class="uniform">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                                
                                <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                    
                                    <label>Type</label>
                                    <div class="uniform">
                                        <label for="yes">
                                            <input type="checkbox" name="yes" id="yes"/>
                                            Warranty
                                        </label>
                                        <label for="no">
                                            <input type="checkbox" name="no" id="no"/>
                                            PPM Contact
                                        </label>
                                        <label for="cant">
                                            <input type="checkbox" name="no" id="no"/>
                                            Repair argent
                                        </label>
                                    
                                </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Fault Description And Service Description</label>
                                            <div>
                                            
                                                <textarea name="textarea" height="50px" class="long"></textarea>
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                                
                                                   
                                <div class="padding_10">                                    
                                    
                                    <button type="submit" class="button blue"> <img src="images/icons/white/png/checkmark_icon&16.png" /> Submit </button>
                                    <button type="reset" class="button green"> <img src="images/icons/white/png/brush_icon&16.png" /> Preview </button>
                                    
                                    <div class="clear"></div><!-- CLEAR BOTH -->
                                    
                                </div>

                            </form>
                            
                        </div>
                        
                    </div>
                    
                </div>
 
Lock Down I need more help i am making a request form. After the data submit will be save in database and when the record and 1 id click on the full preview record


see my request form:
mITGuxNb_1-_ifGtGzKn.png



and like this display record:
kMbxMtt9znHIKPskHF0_.png




Please help me
The form you posted looks nothing like the one above. Fix it.
Now why do you have a submit and preview button on the form if the the preview comes up when you hit the id.
I am guessing you have the submit in case you want to make changes to the displayed record??

And why is there a view record in the listing if you are clicking id to display record????

Also for database purposes which of the hospital information will be unique? Reference number??

Explain these and fix the form ..
 
Last edited:
Actually I am making a request form. My client request this form is for every visitor. visitor send request and submit form then goto request inbox in admin panel.

This is the kind of form ticket system. I can not submit and display attachment file and checkbox in db. please you make me an example form

Form:
Hospital | Attachment File | Checkbox


Submit form and goto request inbox

like this:

CIMqFn9I-Q80GDCa6BL9.png


then click CoffeeCup Team To Full View:
UYOj3tmRLJ7DmLEErM2u.png
 
Now I am confused.

You want the form to be displayed.

Then fields are filled out and they click submit.

You then want what?? An email sent to admin? Or a new database record created??

Or both or what??
 
At first i thought he was trying to say

1. wanted a form to submit the records
2. A page shows all records (view record link would open step 3)
3. a single php file that pulls the record id and shows all info submited into the database

Now that hotmail picture threw me off hahah

edit: or maybe he wants a confirmation email link setup?
 
i am making display db record but show this error please solved this problem

PHP:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in  G:\WampDeveloper\Websites\DefaultWebsite\webroot\database\index.php on  line 105
My Code:
PHP:
<div class="mws-panel grid_8">
                    <div class="mws-panel-header">
                        <span class="mws-i-24 i-table-1">Simple Table</span>
                    </div>
                    <div class="mws-panel-body">
                        <table class="mws-table">
                         <thead>
                                <tr>
                                    <th>Full Detail</th>
                                    <th>Hospital Name</th>
                                    <th>Service Report</th>
                                    <th>Date</th>
                                </tr>
                            </thead>
                            <tbody>
                           
                            
 <?php
        $con = mysql_connect("localhost","username","password");
        if (!$con)
          {
          die('Could not connect to database');
          }
        
        mysql_select_db("my_db", $con);
        
        $keywords = $_POST['key_words'];
        
        $sql = "SELECT id, servicereport, hospitalname
                FROM insrep
                WHERE servicereport LIKE '%$keywords%'
                OR hospitalname LIKE '%$keywords%'
                ORDER BY servicereport";
        
        $rst = mysql_query($sql, $con);
        
         echo "<tr class='gradeX'>";
        
        while($a_row = mysql_fetch_assoc($rst)) {
            echo "<td><a href='player.php?id={$a_row['id']}'>"Full Detail Vendor Service Request"</td>";
            echo "<td>" . $row->hostpitalname . "</td>";
            echo "<td>" . $row->servicereport . "</td>";
            echo "<td>" . $row->Date . "</td>";
            echo "</tr>";
            
            
            

        }
        
        mysql_close($con); //close the connection to the database
    ?>
    
     
                            </tbody>
                        </table>
                    </div>
                </div>
 
these
Code:
            echo "<td>" . $row->hostpitalname . "</td>";
            echo "<td>" . $row->servicereport . "</td>";
            echo "<td>" . $row->Date . "</td>";

change to
Code:
            echo "<td>"' . $row->hostpitalname . '"</td>";
            echo "<td>"' . $row->servicereport . '"</td>";
            echo "<td>"' . $row->Date . '"</td>";
 
This error is still coming

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in G:\WampDeveloper\Websites\DefaultWebsite\webroot\database\index.php on line 105
 
this should work. Change the other one.
PHP:
 echo "<td><a href='player.php?id={$a_row['id']}'>Full Detail Vendor Service Request</td>";
 
this should work. Change the other one.
PHP:
 echo "<td><a href='player.php?id={$a_row['id']}'>Full Detail Vendor Service Request</td>";


Lock Down now this error is coming :(

PHP:
                          Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean  given in  G:\WampDeveloper\Websites\DefaultWebsite\webroot\database\index.php on  line 101
101 Line:
PHP:
while($a_row = mysql_fetch_assoc($rst)) {
My Code:
PHP:
<div class="mws-panel grid_8">
                    <div class="mws-panel-header">
                        <span class="mws-i-24 i-table-1">Simple Table</span>
                    </div>
                    <div class="mws-panel-body">
                        <table class="mws-table">
                         <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Full Detail</th>
                                    <th>Hospital Name</th>
                                    <th>Service Report</th>
                                </tr>
                            </thead>
                            <tbody>
                           
                            
 <?php
        $con = mysql_connect("localhost","username","password");
        if (!$con)
          {
          die('Could not connect to database');
          }
        
        mysql_select_db("my_db", $con);
        
        $keywords = $_POST['key_words'];
        
        $sql = "SELECT id, hospname, refno, description FROM vendor WHERE Full texts hospname LIKE '%$keywords%' OR refno LIKE '%$keywords%' ORDER BY hospname";
        
        $rst = mysql_query($sql, $con);
        
         echo "<tr class='gradeX'>";
        
        while($a_row = mysql_fetch_assoc($rst)) {
            echo "<td>" . $a_row['hospname'] . "</td>";
            echo "<td>" . $a_row['refno'] . "</td>";
            echo "<td>" . $a_row['description'] . "</td>";
            echo "<td><a href='player.php?id={$a_row['id']}'>Full View</td>";  
            echo "</tr>";
            
            
            

        }
        
        mysql_close($con); //close the connection to the database
    ?>
    
     
                            </tbody>
                        </table>
                    </div>
                </div>

cDeFbdxXmkROcugs-SAI.png
 
add this line
PHP:
 or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
after
PHP:
$rst = mysql_query($sql, $con)
and remove the extra ;
 
i am add this line but this error is show

Parse error: syntax error, unexpected T_LOGICAL_OR in G:\WampDeveloper\Websites\DefaultWebsite\webroot\database\index.php on line 99

PHP:
   $sql = "SELECT id, hospname, refno, description FROM vendor WHERE Full texts hospname LIKE '%$keywords%' OR refno LIKE '%$keywords%' ORDER BY hospname";
        
        $rst = mysql_query($sql, $con);
        
         or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());

Line 99 is:
PHP:
         or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
 
I told you to remove that initial semicolon before the or statement.

THis way:
PHP:
 $rst = mysql_query($sql, $con) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
 
hello Lock Down atleast i am make Form Vendor Server and Display but just some problem this form, i am submit form and i am see display record dont show Fault Description And Service Description textarea, Type checkbox and attecment file only show upload file name this is not a link to download please make this solved the problem

My Form Code:
PHP:
<div class="toggle_container">
                        <div class="block">
                            <form enctype="multipart/form-data" action="add.php" method="POST">
                                <center><b><h7>Vendor Service Request</h7></b></center>
                                
                                <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label class="hospitalname">Hospital Name</label>
                                            <div>
                                                <input type="text" name="hospname" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Ref No.</label>
                                            <div>
                                            
                                                <input type="text" name="refno" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                                
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>From</label>
                                            <div>
                                                <input type="text" name="from" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Description</label>
                                            <div>
                                            
                                                <input type="text" name="description" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                      
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>Designation</label>
                                            <div>
                                                <input type="text" name="designation" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Manufacture</label>
                                            <div>
                                            
                                                <input type="text" name="manufacture" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                      
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>Tel Number</label>
                                            <div>
                                                <input type="text" name="telnumb" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Models</label>
                                            <div>
                                            
                                                <input type="text" name="models" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                      
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>Mobile Number</label>
                                            <div>
                                                <input type="text" name="mobnumb" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Serial numbers</label>
                                            <div>
                                            
                                                <input type="text" name="serialnumb" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                                
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>Fax</label>
                                            <div>
                                                <input type="text" name="fax" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Equipment</label>
                                            <div>
                                            
                                                <input type="text" name="equipment" class="long">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                      
                                 <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                            <label>Email address</label>
                                            <div>
                                                <input type="text" name="emailadd" class="long">
                                            </div>
                                        </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label class="attachment">Attachement</label>
                                            <div>
                                            
                                                <input type="file" id="fileupload2" name="attachement" class="uniform">
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                                
                                <div class="columns clearfix">
                                    
                                    <div class="col_50">
                                        <fieldset>
                                    
                                    <label>Type</label>
                                    <div class="uniform">
                                        <label for="yes">
                                            <input type="checkbox" name="yes" name="type" id="yes"/>
                                            Warranty
                                        </label>
                                        <label for="no">
                                            <input type="checkbox" name="no" name="type" id="no"/>
                                            PPM Contact
                                        </label>
                                        <label for="cant">
                                            <input type="checkbox" name="no" name="type" id="no"/>
                                            Repair argent
                                        </label>
                                    
                                </fieldset>
                                    </div>
                                    
                                    <div class="col_50">
                                    
                                        <fieldset>
                                            
                                            <label>Fault Description And Service Description</label>
                                            <div>
                                            
                                                <textarea name="textarea" height="50px" name="faultdsd" class="long"></textarea>
                                            
                                            </div>
                                            
                                        </fieldset>
                                    
                                    </div>
                                    
                                </div>
                                
                                                   
                                <div class="padding_10">                                    
                                    
                                    <button type="submit" value="Add" class="button blue"> <img src="images/icons/white/png/checkmark_icon&16.png" /> Submit </button>
                                    <div class="clear"></div><!-- CLEAR BOTH -->
                                    
                                </div>

                            </form>
                            
                        </div>
                        
                    </div>
                    
                </div>
add.php file code:
PHP:
 <?php 
 
 //This is the directory where images will be saved 
 $target = "vendor-req-service/"; 
 $target = $target . basename( $_FILES['attachement']['name']); 
 
 //This gets all the other information from the form 
 $id=$_POST['ClientID']; 
 $hospname=$_POST['hospname']; 
 $refno=$_POST['refno']; 
 $from=$_POST['from']; 
 $description=$_POST['description']; 
 $designation=$_POST['designation']; 
 $manufacture=$_POST['manufacture']; 
 $telnumb=$_POST['telnumb']; 
 $models=$_POST['models']; 
 $mobnumb=$_POST['mobnumb']; 
 $serialnumb=$_POST['serialnumb']; 
 $fax=$_POST['fax']; 
 $equipment=$_POST['equipment']; 
 $emailadd=$_POST['emailadd'];
 $type=$_POST['type']; 
 $faultdsd=$_POST['faultdsd']; 
 $pic=($_FILES['attachement']['name']);


 
 
 // Connects to your Database 
 mysql_connect("localhost", "zain", "pimsat") or die(mysql_error()) ; 
 mysql_select_db("zain") or die(mysql_error()) ; 
 
 //Writes the information to the database 
 mysql_query("INSERT INTO `vendor` VALUES ('$id', '$hospname', '$refno', '$from', '$description', '$designation', '$manufacture', '$telnumb', '$models', '$mobnumb', '$serialnumb', '$fax', '$equipment', '$emailadd',  '$pic',  '$type',  '$faultdsd')") ; 
 
 //Writes the photo to the server 
 if(move_uploaded_file($_FILES['attachement']['tmp_name'], $target)) 
 { 
 
 //Tells you if its all ok 
 echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory"; 
 } 
 else { 
 
 //Gives and error if its not 
 echo "Sorry, there was a problem uploading your file."; 
 } 
 ?>
Display Form:
Yd9Naw424FOVaTJnpWhi.png



Display Record Code
PHP:
<div class="mws-panel grid_8">
                    <div class="mws-panel-header">
                        <span class="mws-i-24 i-table-1">Simple Table</span>
                    </div>
                    <div class="mws-panel-body">
                        <table class="mws-table">
                         <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Full Detail</th>
                                    <th>Full Detail</th>
                                    <th>Hospital Name</th>
                                    <th>Service Report</th>
                                </tr>
                            </thead>
                            <tbody>
                           
                            
 <?php
        $con = mysql_connect("localhost","zain","pimsat");
        if (!$con)
          {
          die('Could not connect to database');
          }
        
        mysql_select_db("zain", $con);
        
        $keywords = $_POST['key_words'];
        
        $sql = "SELECT ClientID, hospname, refno, description FROM vendor WHERE hospname LIKE '%$keywords%' OR refno LIKE '%$keywords%' ORDER BY ClientID";  
        
         $rst = mysql_query($sql, $con) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());  
        
         echo "<tr class='gradeX'>";
        
        while($a_row = mysql_fetch_assoc($rst)) {
            echo "<td>" . $a_row['ClientID'] . "</td>";
            echo "<td>" . $a_row['hospname'] . "</td>";
            echo "<td>" . $a_row['refno'] . "</td>";
            echo "<td>" . $a_row['description'] . "</td>";
            echo "<td><a href='player3.php?id={$a_row['ClientID']}'>Full View</td>";  
            echo "</tr>";
            
            
            

        }
        
        mysql_close($con); //close the connection to the database
    ?>
    
     
                            </tbody>
                        </table>
                    </div>
                </div>
Preview Short Record Form:
h6otV7L8Bf-WPok7tVeV.png


Then Click Full View Record Code:
PHP:
<div class="toggle_container">
                        <div class="block">
                            <form enctype="multipart/form-data" action="add.php" method="POST">
                                <center><b><h7>Vendor Service Request</h7></b></center>
                                
                                
                                
                                 <?php
        $con = mysql_connect("localhost","zain","pimsat");
        if (!$con)
          {
          die('Could not connect to database');
          }
        
        mysql_select_db("zain", $con);
        
        $id = $_GET['ClientID'];
        
        $sql = "SELECT * FROM vendor WHERE hospname LIKE '%$keywords%' OR refno LIKE '%$keywords%' ORDER BY ClientID";  
        
        $rst = mysql_query($sql, $con) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());  
        $a_row = mysql_fetch_assoc($rst);
        
        print ("<div class='columns clearfix'>" );
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Hospital Name</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['hospname']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );                        
        
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Hospital Name</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['refno']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );        
        print ("</div>" );
        
        print ("<div class='columns clearfix'>" );
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>From</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['from']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );                        
        
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Description</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['description']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );        
        print ("</div>" );
        
        print ("<div class='columns clearfix'>" );
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Designation</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['designation']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );                        
        
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Manufacture</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['manufacture']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );        
        print ("</div>" );
        
        print ("<div class='columns clearfix'>" );
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Tel Number</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['telnumb']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );                        
        
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Models</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['models']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );        
        print ("</div>" );
        
        print ("<div class='columns clearfix'>" );
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Mobile Number</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['mobnumb']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );                        
        
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Serial Numbers</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['serialnumb']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );        
        print ("</div>" );
        
        print ("<div class='columns clearfix'>" );
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Fax</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['fax']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );                        
        
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Equipment</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['equipment']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );        
        print ("</div>" );
        
        print ("<div class='columns clearfix'>" );
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Email address</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['emailadd']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );                        
        
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Attachement</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['attachement']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );        
        print ("</div>" );
        
        print ("<div class='columns clearfix'>" );
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Type</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['type']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );                        
        
        print ("<div class='col_50'>" );
        print ("<fieldset>" );
        print ("<label>Fault Description And Service Description</label>" );
        print ("<div>" );
        print ("<label class='hospitalname'>{$a_row['faultdsd']}</label>" );
        print ("</div>" );
        print ("</fieldset>" );
        print ("</div>" );        
        print ("</div>" );
        
        ?>
Display Full Record:
Hb3eIFTnCSmuBYK05pBt.png
 
There are two name qualifiers in your html form for Fault Description And Service Description but no id. change name="faultdsd" to id="faultdsd" in this line: <textarea name="textarea" height="50px" name="faultdsd" class="long">


Regarding checkbox: Set same ID for all the fields i.e. id="type" rather than id="yes" or "no".

<label for="yes">
<
input type="checkbox" name="yes" name="type" id="yes"/>
Warranty
</label>
<
label for="no">
<
input type="checkbox" name="no" name="type" id="no"/>
PPM Contact
</label>
<
label for="cant">
<
input type="checkbox" name="no" name="type" id="no"/>
Repair argent
</label>



Will have to take a look at your code properly for the file part.
 
PHP:
 <textarea name="textarea" height="50px" name="faultdsd" class="long"></textarea>
ID isn't needed, though the data is being posted under textarea name. Remove that attribute.
PHP:
 <textarea height="50px" name="faultdsd" class="long"></textarea>

Same goes for type checkbox too
Replace
PHP:
 <label for="yes">
                                            <input type="checkbox" name="yes" name="type" id="yes"/>
                                            Warranty
                                        </label>
                                        <label for="no">
                                            <input type="checkbox" name="no" name="type" id="no"/>
                                            PPM Contact
                                        </label>
                                        <label for="cant">
                                            <input type="checkbox" name="no" name="type" id="no"/>
                                            Repair argent
                                        </label>

With
PHP:
                                        <label for="yes">
                                            <input type="checkbox" name="type" value="yes"/ id="yes">
                                            Warranty
                                        </label>
                                        <label for="no">
                                            <input type="checkbox" name="type" value="no" id="no"/>
                                            PPM Contact
                                        </label>
                                        <label for="cant">
                                            <input type="checkbox" name="type" value="cant" id="cant"/>
                                            Repair argent
                                        </label>
Id would be needed for labels in this case though and use value attribute to send specific value
 
Last edited:
Status
Not open for further replies.
Back
Top