473,461 Members | 1,384 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1674
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.