Solved

PHP / HTML Display Code

Posted on 2011-03-18
4
316 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

752 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