Post form

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
ErikvdB
Posts: 11
Joined: Wed 12. Jul 2006, 16:03

Post form

Post by ErikvdB »

Hi!
I want to build my own form, so I have created a page (plain text) with the content:

Code: Select all

{PHP:myPHP/agenda.php}
In this file, I have both the form and the code to process the form. But when I post this form to itself (index.php?id=83,...) I have no value in my $_POST-variable.

The code from my form (part):

Code: Select all

	<form method=\"post\" action=\"index.php?id=87,61,0,0,1,0\">
	<table>
		<tr>
	    	<td><b>Datum:</b></td>
      	  <td><input type=\"text\" name=\"datum\" value=\"".$nu."\">
  				<input type=\"button\" value=\"Datum\" onclick=\"DoCal(this.form.datum)\"></td>
</tr>
		<tr>
		<td><input type=\"submit\" value=\"Toevoegen\"></td><td>&nbsp;</td>
		</table>
	</form>
Thanx in advance!
User avatar
Oliver Georgi
Site Admin
Posts: 9919
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Please always if you have problems with your forms do this first inside the form code.

Code: Select all

[PHP]print_r($_POST)[/PHP]
phpwcms does not touch your POST values - so it has to be there when you access it in the right way.

The only thing phpwcms is doing for all GET and POST vars is checking for PHP replacement tags and making these unusable to avoid security problems.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply