Jump to content

[SOLVED] "<form .... action='.....'>" making a "index.php?action=" type link


Jodha

Recommended Posts

Hi All,

 

Been up to some interesting things, now got a website shell well on its way to fully communicating with its website db. Got a posting form question, hope you can help :)

 

My 'page display' is thus: header at top; menu at left; content (as per navigation) on the right; footer at bottom.

 

Currently I have some forms appearing in the 'content' area of my 'page display'. When I hit 'submit' on my form the processing script .php file replaces my entire (previously described) 'page display'. I.E. I loose header, menu and footer, and only see what I echo on the form processing .php file.

 

On the "<form... action='.....'>" part of the start tag for my form, is there a way of making the form processing .php file appear in my content area (as oppose to replacing my whole 'page display')?

 

I have tried various variations of link within the ''s of action='...', but to no avail.

 

- this includes index.php?action='blah'

 

Currently the 'page display' builds by constructing a table via echo, and in each cell in the table I am using an

 

include ('xxx.php');

 

command to display the section I want.

 

In the content area the section in the parenthesis is a variable, which allows different .php files to be loaded into my content section. This has been faultless using normal <a href...> type links.

 

IE

 

for "home" my URL =

 

website/index.php?action=home

 

for "add text" my URL =

 

website/index.php?action=add_text

 

But when I process the add text form the URL =

 

website/"the directory the processing form is in"/add_text_exe.php

 

Hmmm... any thoughts?

Solved! Funny what a cuppa tea and a fag break can achieve.

 

I needed to add a row to my content table which refers to the form processing .php file.

 

Next, the "action='...'" section needs to be (as I tried before adding the relevant row in my content table)

 

action='index.php?action="the reference to the form processing file, as per content table"'

 

With the amendment to the content table I have the functionality that I want

 

;D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.