473,395 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Table

im just a beginer in php
i have some problems
i have to make a table with 6 row and 7 column then in each row include a name family name and birthday also user name and pass for them .
i have tried it but i have some problems will someone help me find a way ?please
Nov 8 '06 #1
10 1672
you did tell us that what kind of table you want to make ..
sql database table or
html table ?
Nov 8 '06 #2
ronverdonk
4,258 Expert 4TB
For such a simple (MySQL I presume?) table it is easier to use phpMyAdmin. It's only 6 rows so why write a program to do that? Unless you want to expand in the future.

Ronald :cool:
Nov 8 '06 #3
you did tell us that what kind of table you want to make ..
sql database table or
html table ?
its a html table my friend
Nov 8 '06 #4
ronverdonk
4,258 Expert 4TB
And filling it from PHP variables? Please describe it a bit more, because all I know now is that you want PHP to echo an HTML <table> with 6 rows <tr> and each row 7 cells <td>. As in
[php]
echo "<table>
<tr>
<td>name</td>
<td>age</td>
<td>birthday</td>
<td>address</td>
<td>city</td>
<td>userid</td>
<td>password</td>
</tr>
</table>";
[/php]
But how do you fill that table with the data? Is it from PHP variables, constants, how ?

Ronald :cool:
Nov 8 '06 #5
And filling it from PHP variables? Please describe it a bit more, because all I know now is that you want PHP to echo an HTML <table> with 6 rows <tr> and each row 7 cells <td>. As in
[php]
echo "<table>
<tr>
<td>name</td>
<td>age</td>
<td>birthday</td>
<td>address</td>
<td>city</td>
<td>userid</td>
<td>password</td>
</tr>
</table>";
[/php]
But how do you fill that table with the data? Is it from PHP variables, constants, how ?

Ronald :cool:
we have a txt file that include users info we have to read that info and print it in correct place in our table also a number for each row .
Nov 9 '06 #6
ronverdonk
4,258 Expert 4TB
we have a txt file that include users info we have to read that info and print it in correct place in our table also a number for each row .
We can only advise with some sensible code when we know the layout of each text record in your file. We cannot guess at that! So show that layout.

Ronald :cool:
Nov 9 '06 #7
We can only advise with some sensible code when we know the layout of each text record in your file. We cannot guess at that! So show that layout.

Ronald :cool:
No Name Family Name User Password Birthday
1
2
3
4
5
6



In text file which we have there is 6 person names and their info


1.kevin any text User1 002525 02.21.55
2.katy any text User1 002524 02.21.55
3.lora any text User1 002523 02.21.55
4.mark any text User1 002522 02.21.55
5.jenny any text User1 002521 02.21.55
6.john any text User1 002520 02.21.55


the text file must be used with openfile and the info of that file must be printed in correct place on the table
Nov 9 '06 #8
ronverdonk
4,258 Expert 4TB
Seeing your text record layout I still have 3 questions:

1. is the separator between the text fields just a blank character or a comma or anything else?
2. does field 'any name' contain any character INCLUDING BLANKS?
3. can any other field contain embedded blanks?

If you have no field separator (other then blank) and that 'any name' field can contain blanks, the only way to solve this is parse the name from the start of the string. Parse the userid, password and birthday from the end of the string, and wqhat is left is then the family name.
If you have no field separator (other then blank) and all fields can contain blanks, you're in trouble, becasuse there is no way you can distinguish between the various fields.

Ronald :cool:
Nov 9 '06 #9
Seeing your text record layout I still have 3 questions:

1. is the separator between the text fields just a blank character or a comma or anything else?
2. does field 'any name' contain any character INCLUDING BLANKS?
3. can any other field contain embedded blanks?

If you have no field separator (other then blank) and that 'any name' field can contain blanks, the only way to solve this is parse the name from the start of the string. Parse the userid, password and birthday from the end of the string, and wqhat is left is then the family name.
If you have no field separator (other then blank) and all fields can contain blanks, you're in trouble, becasuse there is no way you can distinguish between the various fields.

Ronald :cool:
1.there is nothing beetween them
2.about second just put a text as the way u want it must be printed in family name column.
3.yes they can
Nov 9 '06 #10
ronverdonk
4,258 Expert 4TB
So you have an entire and completely unstructured set of data that must be put correctly in a table!
Then see my last reply about this situation
If you have no field separator (other then blank) and all fields can contain blanks, you're in trouble, becasuse there is no way you can distinguish between the various fields.
Ronald :cool:
Nov 9 '06 #11

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

Similar topics

4
by: Gaz | last post by:
Hi, I need to have a table nested within another table. The tables are alongside each other visually speaking, and the nested table (on the right) can vary in size. My problem is that when the...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
3
by: Terrence Brannon | last post by:
I don't know what Postgres considers a relation and had no intention of creating one when piping my schema to it... I always DROP TABLE before CREATE TABLE, so here are the ERRORS emitted when...
4
by: maricel | last post by:
I have the following base table structure - DDL: CREATE TABLE "ADMINISTRATOR"."T1" ( "C1" INTEGER NOT NULL ) IN "TEST_TS" ; ALTER TABLE "ADMINISTRATOR"."T1" ADD PRIMARY KEY
4
by: Simone Battagliero | last post by:
I wrote a program which inserts and finds elements in an hash table. Each element of the table is a dinamic list, which holds all elements having the same hash value (calculated by an int...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
76
MMcCarthy
by: MMcCarthy | last post by:
Normalisation is the term used to describe how you break a file down into tables to create a database. There are 3 or 4 major steps involved known as 1NF (First Normal Form), 2NF (Second Normal...
7
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the...
5
by: wugon.net | last post by:
question: db2 LUW V8 UNION ALL with table function month() have bad query performance Env: db2 LUW V8 + FP14 Problem : We have history data from 2005/01/01 ~ 2007/05/xx in single big...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.