Page 1 of 1

Includes and forms

Posted: Tue Feb 17, 2004 11:07 am
by John Cartwright
Okay I have my index file ( index.php ) which loads up admin.php in it when clicked on a certain link. Now if I wanted to add to my database from admin.php ( loaded from index.php ) would I have to change the form action to index.php or admin.php. I tried setting the form action to admin.php but that doesnt work, neither does php_self


Or what. The variables that load admin.php are

?p=4&a=2 and this is what my form action looks like.

Code: Select all

<?php
	   "<form action="{$_SERVER['PHP_SELF']}"\n".
?>
I also want to keep the result msg in index.php and not in a seperate window.

Posted: Tue Feb 17, 2004 1:40 pm
by John Cartwright
Okay problem fixed I just had a bit a bad coding :S...

But how to I add those variables when the form is submitted aswell?>

Edit* another problem is that index.php is the one that checks the variables :S and sets the includes depending on whats being loaded. Is there a way around this? so that even though is xe/admin.php being loaded index.php still checks the variableS?