Hi Mike, Sorry that the response is a bit late. I will keep in mind to include the whole details of the error next time, sorry for the toruble. Somehow, I just couldn't manage to get all 3 tables updated from a single php file (well, understandable since I'm a beginner) so now I am going through 3 seperate scripts one calling the next page in line. But I really was hoping to cut down on the page travelling since there are (or would mostly be) a few lines of input for each if not none. Maybe I'm trying to re-invent the wheel but I couldn't find a suitable CMS out there that would beeasily modifiable to suit my exact needs and thus set out to put together my own. Intention is to provide an interface so that tour package details could be entered into the DB for use with a generic php/html page that would display all the info available per tour in an orderly manner. So now this info can be entered through several steps. I would still need to find a way to give options to create tables (for html) to the user, i.e. num.of columns, rows, the contents of the header row(s), alignment etc. I know it will take me a long way to accomplish all this but I'm not lucky in finding examples that could show me the way, where/how to start... I will try your suggestions and let you know. Thanks for all your help. Alp "Mike Smith" <mikeosmith@xxxxxxxxx> wrote in message news:d46325db0502030336da01f94@xxxxxxxxxxxxxxxxx > Change: > > while ($c=0;$c<count($_POST['tourid']):$c++) > > to (change the : before $c++ to ;): > > for ($c=0;$c<count($tourid);$c++) > > I think i mentioned the while loop in my first reply. I should have said for. > (See: http://us2.php.net/for, http://us3.php.net/while, > http://us4.php.net/foreach) > > I'm not sure what you mean by "form is posted to itself". Do you have > the function at the top of the page with the form? If so, you can do > something like > > if($_POST['var']){ > > add_to_database( $tourid, $dayno, $fromto, $bld, $descrip, > &$dberror) > //ideally you'd forward to another page to let the user know the form > was received OK... > } else { > > //Show form > > } > > Please post any specific error message you may get, not just "a parse > error", it will save my eyes! > > Thanks, > Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php