Opening php forms in main window from HTML code (Solved)

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
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)

Post by Erubyr »

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
Last edited by Erubyr on Tue 21. Mar 2006, 09:31, edited 1 time in total.
User avatar
Erubyr
Posts: 7
Joined: Thu 2. Mar 2006, 16:58
Location: Rotterdam the Netherlands und Friedeburg Deutschland

Post by Erubyr »

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
User avatar
Erubyr
Posts: 7
Joined: Thu 2. Mar 2006, 16:58
Location: Rotterdam the Netherlands und Friedeburg Deutschland

Solved

Post by Erubyr »

OK, problem solved, I clearly still need to learn a lot about PHP.
Lee H
Posts: 8
Joined: Wed 26. Apr 2006, 20:46

Post by Lee H »

I would love to know what you found out. I've been scouring the boards trying to find out how to do this myself.

Thanks
User avatar
Oliver Georgi
Site Admin
Posts: 9928
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

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 Georgi | phpwcms Developer | GitHub | LinkedIn
Lee H
Posts: 8
Joined: Wed 26. Apr 2006, 20:46

Post by Lee H »

Oliver, Thanks so much for personally responding to me. I know you're time is very valuable. :D

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
Post Reply