Solved

PHP / HTML Display Code

Posted on 2011-03-18
4
327 Views
Last Modified: 2012-05-11
Currently this code displays data from a mysql database in browser & it is show as like:

Cust No:
Phone No:
First Name:
Last Name:

Is there a way to make it be shown like this in a browser:

Cust No:               Phone Number:
First Name:           Last Name:


<b>Cust No:</b> <br><input type="text" name="cust" size="15" maxlength="30" value="'.$row[0].'" /><br>
<b>Phone No:</b> <br><input type="text" name="phone" size="15" maxlength="30" value="'.$row[15].'" /><br>
<b>First Name:</b> <br><input type="text" name="fname" size="15" maxlength="30" value="'.$row[1].'" /><br />
<b>Last Name:</b> <br><input type="text" name="lname" size="2" maxlength="30" value="'.$row[2].'" /><br /

Open in new window

0
Comment
Question by:wantabe2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Expert Comment

by:Chris Millard
ID: 35168483
<b>Cust No:</b> <br><input type="text" name="cust" size="15" maxlength="30" value="'.$row[0].'" />
<b>Phone No:</b> <input type="text" name="phone" size="15" maxlength="30" value="'.$row[15].'" /><br>
<b>First Name:</b> <br><input type="text" name="fname" size="15" maxlength="30" value="'.$row[1].'" />
<b>Last Name:</b> <input type="text" name="lname" size="2" maxlength="30" value="'.$row[2].'" /><br /

Open in new window

0
 
LVL 17

Assisted Solution

by:Chris Millard
Chris Millard earned 167 total points
ID: 35168490
Or you could look at creating a 2 x 2 table and having the values in the cells
0
 

Assisted Solution

by:zaccarter
zaccarter earned 166 total points
ID: 35168613
What you need to do is put it into a table like this one...

<table align="center" width="700">




//START YOUT LOOP HERE...
<tr>
    <td align="left" width="25%">Customer Number:</td>
    <td align="left" width="25%"><input type="text" name="cust" size="15" maxlength="30" value="'.$row[0].'" /></td>
    <td align="left" width="25%">Phone Number:</td>
    <td align="left" width="25%"><input type="text" name="cust" size="15" maxlength="30" value="'.$row[15].'" /></td>
</tr>
<tr>
    <td align="left" width="25%">First Name:</td>
    <td align="left" width="25%"><input type="text" name="cust" size="15" maxlength="30" value="'.$row[1].'" /></td>
    <td align="left" width="25%">Last Name:</td>
    <td align="left" width="25%"><input type="text" name="cust" size="15" maxlength="30" value="'.$row[2].'" /></td>
</tr>

// END YOUR LOOP HERE. MAKE SURE TO KEEP THE <table> OUTSIDE OF THE LOOP AND //THE </TABLE> JUST OUTSIDE THE END OF THE LOOP
</table>
   
0
 
LVL 3

Accepted Solution

by:
Prafulla Maharjan earned 167 total points
ID: 35170042
<table width="100%" border="0">
  <tr>
    <td><b>Cust No:</b> <br><input type="text" name="cust" size="15" maxlength="30" value="'.$row[0].'" /></td>
    <td><b>Phone No:</b> <br><input type="text" name="phone" size="15" maxlength="30" value="'.$row[15].'" /><br></td>
  </tr>
  <tr>
    <td><b>First Name:</b> <br><input type="text" name="fname" size="15" maxlength="30" value="'.$row[1].'" /><br /></td>
    <td><b>Last Name:</b> <br><input type="text" name="lname" size="2" maxlength="30" value="'.$row[2].'" /></td>
  </tr>
</table>



this code may help you

i just place the content in the table
thanks.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question