|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
bastian76 Smarty n00b
Joined: 21 Mar 2004 Posts: 4
|
Posted: Sun Mar 21, 2004 4:43 pm Post subject: Problems with PHP5 and $_POST|GET |
|
|
hoy,
i have some probs - when i try to access $_POST['blabla'] - php says "... undefined index blabla ...". have anyone a good idea how to solve this problem? i use apache 2.0.49 / php 5 rc1 / smarty 2.6.2.
thanx in advance
sebastian
(www.pixelfashion.net || sebastian.diedrich@pixelfashion.net) |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Sun Mar 21, 2004 5:14 pm Post subject: |
|
|
if you dont pass blabla via post and yet try to access it PHP will throw a notice telling you it doesn't exist this is easily solved by using isset() to test if the variable has been passed before trying to use it. _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
bastian76 Smarty n00b
Joined: 21 Mar 2004 Posts: 4
|
Posted: Sun Mar 21, 2004 5:19 pm Post subject: |
|
|
exactly this is the problem ... i posted it via post ...
Code: |
<form action="{$self}" method="post" enctype="multipart/form-data" name="xf08">
{#txt_index_host#}<br />
<select name="host" class="medium">
{foreach name=hostsel key=schluessel item=wert from=$hosts}
<option value="{$schluessel}"{if $smarty.foreach.hostsel.first} selected{/if}>{$wert}</option>
{/foreach}
</select>
<br />
{#txt_index_user#}<br /> <input name="user" type="text" class="medium"><br />
{#txt_index_password#}<br /> <input name="password" type="password" class="medium"><br />
<input name="hello" type="hidden" value="world">
<input name="submit" value="{#txt_index_login#}" type="submit" class="button-medium">
</form>
|
? anything not valid through the src above?
cya
sebastian |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|