Hi all,
I have written a HTML form to display a table containing records from a MySql DB in the main part of the PHPWCMS site, which works perfectly. Now I added next and previous (submit) buttons and try to use form method = post to open the same form again but show different records. The table currently contains just over 6000 records so I want to split them up in groups of 20.
When a submit button (next) is pressed and the form is calling itself a second time it does not open in the main part of the site but full screen and not using the template.
Can anyone tell me how I can open a form in the main part of the site properly?
Thanks,
Chris
[edit] typo
Opening php forms in main window from HTML code (Solved)
- Erubyr
- Posts: 7
- Joined: Thu 2. Mar 2006, 16:58
- Location: Rotterdam the Netherlands und Friedeburg Deutschland
Opening php forms in main window from HTML code (Solved)
Last edited by Erubyr on Tue 21. Mar 2006, 09:31, edited 1 time in total.
- Erubyr
- Posts: 7
- Joined: Thu 2. Mar 2006, 16:58
- Location: Rotterdam the Netherlands und Friedeburg Deutschland
OK, I have been going through the phpwcms-docu site and the source code of phpwcms and starting to understand. PHPWMCS is a pretty neat program, especially considering it is free of charge, compliments to Oliver. Also good to hear the news that a new version is about to be released.
The phpwcms website is just a table, so it is not possible to load your page in a part of it. As far as I understand now, the form is build in the index.php file by including the content.func.inc.php file where the table is build.
What I have been unable to find thusfar is how the screen is updated when a link in the navigation menu to the left or the breadcrumbs item on top of the main screen is clicked.
It seems to have something to do with cached items in the database but since this is only my second week programming in PHP I am unable to find the right part. I have been programming Visual Basic for a couple of years in the past, but PHP is something completely different.
Can anyone tell me how I could call the index.php or content.func.inc.php in such a way that the screen is refreshed and new data is shown in the content part shown from within my own php script?
Thanks in advance,
Chris
The phpwcms website is just a table, so it is not possible to load your page in a part of it. As far as I understand now, the form is build in the index.php file by including the content.func.inc.php file where the table is build.
What I have been unable to find thusfar is how the screen is updated when a link in the navigation menu to the left or the breadcrumbs item on top of the main screen is clicked.
It seems to have something to do with cached items in the database but since this is only my second week programming in PHP I am unable to find the right part. I have been programming Visual Basic for a couple of years in the past, but PHP is something completely different.
Can anyone tell me how I could call the index.php or content.func.inc.php in such a way that the screen is refreshed and new data is shown in the content part shown from within my own php script?
Thanks in advance,
Chris
- Oliver Georgi
- Site Admin
- Posts: 9928
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
best practice is to use the external form using phpwcms' PHP includes. Then prepare your form to handel the target page - this always should be the same as where the form is displayed. Pagination can realized by sending POST values which is processed inside your custom form script. Or you can build the target phpwcms article URL with some additional GET values.
Oliver
Oliver
Oliver, Thanks so much for personally responding to me. I know you're time is very valuable.
My eyes hurt from all the searching and reading, but I just came back to this post to say I have a answer. I found a post you did a 2 1/2 years ago. I tried the example you posted and it worked. Now I understand what I need to do. It was basically what you just now said, but there was a example posted. I am the kind of person that has to "do it" to understand.
Here's the post if it may help someone else.
http://www.phpwcms.de/forum/viewtopic.php?p=921#921
Respectfully,
Lee

My eyes hurt from all the searching and reading, but I just came back to this post to say I have a answer. I found a post you did a 2 1/2 years ago. I tried the example you posted and it worked. Now I understand what I need to do. It was basically what you just now said, but there was a example posted. I am the kind of person that has to "do it" to understand.
Here's the post if it may help someone else.
http://www.phpwcms.de/forum/viewtopic.php?p=921#921
Respectfully,
Lee