473,785 Members | 2,309 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

html table in php code

18 New Member
hello,
i need html table to be inserted in php code..i tried this but i am getting some problem with it so can anyone help me..
Thank u..

My actual code is this
Expand|Select|Wrap|Line Numbers
  1. $messageproper ="\n\n" .
  2.         "Name: " .
  3.         ucwords($_POST['name']) .
  4.         "\n" .
  5.         "Email: " .
  6.         ucwords($email) .
  7.         "\n" .
  8.         "Message: " .
  9.         $_POST['message'] .
  10.         "\n" .
  11.         "\n\n" ;
i tried and i need some thing like this..but i am not getting... is there any error in this.. please suggest me..
Expand|Select|Wrap|Line Numbers
  1.  $messageproper = "<table bgcolor= "."gray ".">
  2.                    <tr>
  3.                       <td>Name : </td>
  4.                       <td>Email :</td>
  5.                       <td>Message :</td>
  6.                    </tr>
  7.                    <tr>
  8.                       <td>".ucwords($_POST['name'])."</td>
  9.                       <td>".ucwords($email)."</td>
  10.                       <td>".$_POST['message']."</td>
  11.                    </tr>
  12.                  </table>";
Dec 3 '10 #1
2 1798
Mayur2007
67 New Member
Hello,

See below example, it might be helpful.

Expand|Select|Wrap|Line Numbers
  1. $message ='<table width="100%" border="0" cellspacing="0" cellpadding="0">
  2.   <tr>
  3.     <td>Name:</td>
  4.     <td>'.$name.'</td>
  5.   </tr>
  6.   <tr>
  7.     <td>Email:</td>
  8.     <td>'.$email.'</td>
  9.   </tr>
  10.   <tr>
  11.     <td>Address:</td>
  12.     <td>'.$address.'</td>
  13.   </tr>
  14.   <tr>
  15.     <td>Comment:</td>
  16.     <td>'.$comment.'</td>
  17.   </tr>
  18. </table>';
  19.  
  20. echo $message;
  21.  
Regards,
Mayur Bhayani
Dec 3 '10 #2
yusuf ali bozki
4 New Member
you must create array ;)
Dec 3 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
26875
by: john T | last post by:
Is there anyway to vertically center a html table using css in such a way it does not alter the html table. When I tryied it just screws up.
4
1602
by: Sebastiano | last post by:
I have written a simple page with a 1x1 HTML table. I have set the two property height and width of the table to 100%. I have named this page test.htm and I try to see it using my IIS 5.0 (in Windows 2000 pro) and IE 6.1. My machine have installed .NET Framework 1.1 too. I see my page right, the table covers all the space of the browser. If I change the page name in test.aspx and I try to reload it, the height property is ignored and the...
4
2691
by: ruca | last post by:
Hi How can I get a html control in my code? I have a html table that I want the width is defined in code at run time, i.e., I have this table and I have a datagrid. This datagrid have a variable width because the number of columns depends of something that I have (that is not important for this). Now, what I want is that the html table have always the same width of my datagrid because of alignment of both. NOTE: I must have (and want)...
3
3834
by: Al Wilkerson | last post by:
Hey, I have a Web Form with a drop down list, textbox, and search button. When click the search button an SQL server database is queried fordata. Once I have the data in a dataset I use the dataset to dynamically create a Html Table control. I want to display the table on another frame page (target="main") without the web form controls (i.e. the textbox, search button, and dropdown list). I just want the table displayed only on the...
1
6347
by: Al Wilkerson | last post by:
Hey, I have a Web Form with a drop down list, textbox, and search button. When click the search button an SQL server database is queried fordata. Once I have the data in a dataset I use the dataset to dynamically create a Html Table control. I want to display the table on another frame page (target="main") without the web form controls (i.e. the textbox, search button, and dropdown list). I just want the table displayed only on the...
10
3164
by: Coleen | last post by:
Hi all :-) I have a weird formatting problem with an HTML table that I am populating using VB.Net and HTML. Here is the snippet of code for the cell I'm trying to format: Dim ld_tot_pet_clean_fee_calc As Double ld_tot_pet_clean_fee_calc = li_net_total_calc * 0.0075 ld_tot_pet_clean_fee = lo_misc_func.FormatMC(ld_tot_pet_clean_fee_calc, "D") Session("tot_pet_clean_fee") = lo_misc_func.FormatMC(ld_tot_pet_clean_fee, "D")...
4
21314
by: McGowan | last post by:
Hi, I'm trying to display data from a mysql database in a HTML table but for some reason my code isn't working. At the moment I have got it to read and display the headers and the first row of the table and it actually creates the remaining rows in the html table but it doesn't put any data in them. This is my code so far: <?php $con = mysql_connect("localhost","REMOVED","REMOVED"); if (!$con) {
2
2400
by: Geary | last post by:
I am porting my first traditional app to a web-based app using VS2005 and ASP.NET 2.0. I have a page that will replace a data entry form. To have complete control of layout, I want to use a table as a layout device. Typically I would go with a std html table. With VS2005 I have a choice of a html table control or the web table control. I understand the jus of differences between the two, but I am still unsure whether using the html...
1
16975
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot examples I found on the web. Works in IE and mozilla. http://www.imaputz.com/cssStuff/bigFourVersion.html
7
3726
by: petr.jakes.tpc | last post by:
Hi group, I would like to convert the output of the SQL query, or more generally I would like to convert any "table" data to the html table. I would like to set some rules to format cells, columns or rows (font, colour etc.) of the html table, according to the values in the specific cells. Googling for a while I have found only this tool: http://pasko.net/PyHtmlTable/
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10350
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10097
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9957
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5518
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.