Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
create php table to input a  string Can you hel ?

Posted by jesus000 (jesus000), 10 November 2003
Can you help? I am novice in php. I have a webpage that I have to create a table with php. on focus with the mouse another window should be created, to input a string (eg.  name and surname). On this window I have to create two buttons one for delete and another for add to increase the rows in the tables. thank youuuu  

Posted by admin (Graham Ellis), 11 November 2003
Scheme ...

a) Create your popup using JavaScript
b) In your popup, create an HTML form with TARGET= back to the original
c) Enter your text through a form, and append the information for each row of the table to a file, then refresh your target window with the entire contents of that file.

There's quite a lot to do / learn here;  I'm concerned that there are a lot of technologies for a newcomer and I would suggest that you start with the form and the table in the same window, refreshing the whole window each time.

One question to ask very early on - will you have several users at the same time?   If you will, you'll need to have a different file for each of them; I would suggest that you use PHP's session functions for this.

Posted by jesus000 (jesus000), 11 November 2003
Thank you very helful ! any code that could inlight me more ?

Posted by admin (Graham Ellis), 11 November 2003
on 11/11/03 at 19:25:33, jesus000 wrote:
Thank you very helful ! any code that could inlight me more ?

I could give some snippets / thoughts, although not this evening. Please do answer my question about multiple users and persistance needed so I can better tune my answer, though!

Posted by jesus000 (jesus000), 11 November 2003
Dear Graham

I already set  it up for two users.

I will explain in more details what I need to do.

On my second page there should be the table. for a sequential list ( string ), containing text fields. You know ! " to - do " list. When one of the table cells is clicked a new window should open containing an editable version of the cell contents. By cliking a change button in this window should update the contents of the cell on the second page. Later if the page is revisited the change should be displayed. The new window should also contain a " delete " button which removes the cell from the table. and the second page should also contain a button to " add " a new cell to the list. Clear ? I hope so.  common man I know you can do it. Chis.  

Posted by admin (Graham Ellis), 12 November 2003
This forum is very much intended to help people who have questions about PHP as they write their own code, rather than to write code that people need free of charge .... you're certainly right that I could do this (given perhaps a little bit of time), but you wouldn't learn, and you probably couldn't support the code once it was completed.  I do notice that you're a PHP novice .... that's fine - start coding, and do post up any problems that you encounter and we'll help you through.

I am going to re-iterate.   Take the exercise in gentle steps and do NOT start off with multiple windows as that over-complicates things. Start off with a test program that reads a file and produces a table in a loop ....

$info = file ("testdata.txt");
$linecount = 0;
foreach ($info as $line) {
print ("<form><tr><td><input type=submit></td>");
print ("<td>".htmlspecialchars($line),"</td>");
print ("</tr><input type=hidden name=row value=$linecount>");
print ("</form>");

Then go on to write the code to handle the form that's submitted.

There's plenty of other resources available to help you too with this project as you work through it; as well as this forum, there are on line tutorials, books - see, training courses - see etc

Posted by jesus000 (jesus000), 12 November 2003
Thank youuuuu !

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho