Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Help with form arrays

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Help with form arrays

Postby madcitysw » Wed May 28, 2003 7:43 pm

OK, here my problem, i have a form which sends the scores, but i wanted a confirm form to make sure that the user is sending the right data. My problem is I don't know how to add arrays on the confirm form, so that you can save it. The confirm form is all text, no fields or anything, I am using the

<input type="hidden" name="command" value="confirm">
<input type="hidden" name="map" value="{map}">
<input type="hidden" name="gametype_id" value="{gametype_id}">
<input type="hidden" name="team" value="{team}">
<input type="hidden" name="name" value="{name}">
<input type="hidden" name="score" value="{score}">
<input type="hidden" name="kills" value="{kills}">
<input type="hidden" name="assists" value="{assists}">
<input type="hidden" name="deaths" value="{deaths}">

how can you add a array in the {team} area? Some help please...


Thanks
madcitysw
New php-forum User
New php-forum User
 
Posts: 4
Joined: Wed Jan 15, 2003 9:20 am

Re: Help with form arrays

Postby WiZARD » Wed May 28, 2003 10:38 pm

madcitysw wrote:OK, here my problem, i have a form which sends the scores, but i wanted a confirm form to make sure that the user is sending the right data. My problem is I don't know how to add arrays on the confirm form, so that you can save it. The confirm form is all text, no fields or anything, I am using the

<input type="hidden" name="command" value="confirm">
<input type="hidden" name="map" value="{map}">
<input type="hidden" name="gametype_id" value="{gametype_id}">
<input type="hidden" name="team" value="{team}">
<input type="hidden" name="name" value="{name}">
<input type="hidden" name="score" value="{score}">
<input type="hidden" name="kills" value="{kills}">
<input type="hidden" name="assists" value="{assists}">
<input type="hidden" name="deaths" value="{deaths}">

how can you add a array in the {team} area? Some help please...
Thanks

Code: Select all
function get_param($param_name)
{
  global $HTTP_POST_VARS;
  global $HTTP_GET_VARS;

  $param_value = "";
  if(isset($HTTP_POST_VARS[$param_name]))
    $param_value = $HTTP_POST_VARS[$param_name];
  else if(isset($HTTP_GET_VARS[$param_name]))
    $param_value = $HTTP_GET_VARS[$param_name];

  return $param_value;
}

$team=array(get_param('map'),get_param('gametype_id')get_param(team') etc);
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol


Return to PHP coding => General

Who is online

Users browsing this forum: Google Feedfetcher and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.