Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Problems with PHP5 and $_POST|GET

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
bastian76
Smarty n00b


Joined: 21 Mar 2004
Posts: 4

PostPosted: Sun Mar 21, 2004 4:43 pm    Post subject: Problems with PHP5 and $_POST|GET Reply with quote

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
View user's profile Send private message
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Sun Mar 21, 2004 5:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
bastian76
Smarty n00b


Joined: 21 Mar 2004
Posts: 4

PostPosted: Sun Mar 21, 2004 5:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP