Jump to content

Not showing variables


Xtremer360

Recommended Posts

I'm getting the message "Notice: Undefined variable: groupid in /home/content/y/a/n/yankeefaninkc/html/defiant/backstage/backstage_libs/application.php on line 18

 

Notice: Undefined variable: styleid in /home/content/y/a/n/yankeefaninkc/html/defiant/backstage/backstage_libs/application.php on line 18"

 

and I don't know why.

 

<div id=application>
<?php 
$app = $_GET['id'];
switch($app){
case 1:
?>
<h1>Singles Application</h1>
<script type="text/javascript">
function validateForm() {if (document.application.h1_firstname.value == '') { alert('Please enter your first name.'); document.application.h1_firstname.style.background = 'Yellow'; document.application.h1_firstname.focus(); return false; }
if (document.application.h1_surname.value == '') { alert('Please enter your last name.'); document.application.h1_surname.style.background = 'Yellow'; document.application.h1_surname.focus(); return false; }
if (document.application.h1_email.value == '') { alert('Please enter your email address.'); document.application.h1_email.style.background = 'Yellow'; document.application.h1_email.focus(); return false; }
if (document.application.h1_password.value == '') { alert('Please enter your password.'); document.application.h1_password.style.background = 'Yellow'; document.application.h1_password.focus(); return false; }
if (document.application.charactername.value == '') { alert('Please enter your character name.'); document.application.charactername.style.background = 'Yellow'; document.application.charactername.focus(); return false; }
form.submit(); return;
}
</script>
<?php 
customfieldinput($fedid,$id,$groupid,$styleid);
break;
case 2:
?>
<h1>Tag Team Application Form</h1>
<script type="text/javascript">
function validateForm() {if (document.application.h1_firstname.value == '') { alert('Please enter your first name.'); document.application.h1_firstname.style.background = 'Yellow'; document.application.h1_firstname.focus(); return false; }
if (document.application.h1_surname.value == '') { alert('Please enter your last name.'); document.application.h1_surname.style.background = 'Yellow'; document.application.h1_surname.focus(); return false; }
if (document.application.h1_email.value == '') { alert('Please enter your email address.'); document.application.h1_email.style.background = 'Yellow'; document.application.h1_email.focus(); return false; }
if (document.application.h1_password.value == '') { alert('Please enter your password.'); document.application.h1_password.style.background = 'Yellow'; document.application.h1_password.focus(); return false; }
if (document.application.charactername.value == '') { alert('Please enter your character name.'); document.application.charactername.style.background = 'Yellow'; document.application.charactername.focus(); return false; }
if (document.application.team_charactername_1.value == '') { alert('Please enter your first team member name.'); document.application.team_charactername_1.style.background = 'Yellow'; document.application.team_charactername_1.focus(); return false; }
if (document.application.team_genderid_1.value == '0') { alert('Please select your first team member gender.'); document.application.team_genderid_1.style.background = 'Yellow'; document.application.team_genderid_1.focus(); return false; }
if (document.application.team_charactername_2.value == '') { alert('Please enter your second team member name.'); document.application.team_charactername_2.style.background = 'Yellow'; document.application.team_charactername_2.focus(); return false; }
if (document.application.team_genderid_2.value == '0') { alert('Please select your second team member gender.'); document.application.team_genderid_2.style.background = 'Yellow'; document.application.team_genderid_2.focus(); return false; }
form.submit(); return;
}
</script>
<?php
customfieldinput($fedid,$id,$groupid,$styleid);
break;
}
?>
</div>

 

function customfieldinput($fedid,$id,$groupid,$styleid)
{
$query = "SELECT
		field.id as getfieldid,
		field.is_custom as getiscustom,
		field.fullname as getfullname,
		customfields.id as getcustomfieldid,
		customfields.varcharfield as getvarchar,
		customfields.textfield as gettext
	FROM
		efed_list_fields as field
	LEFT JOIN
		efed_content_customfields as customfields
	ON
		(
			field.id = customfields.field_id and
			customfields.character_id = '$id'
		)
	WHERE
		field.fed_id = '$fedid' and
		field.style_id = '$styleid' and
		field.group_id = '$groupid' and
		field.enabled = '1' and
		field.is_custom > '0'
	ORDER BY
		field.is_custom,field.fullname";
$result = mysql_query ($query); 
while ($row = mysql_fetch_assoc($result))
{
	$fieldarray=array('getfieldid','getiscustom','getfullname','getvarchar','gettext','getcustomfieldid');
	foreach ($fieldarray as $fieldlabel)
	{
		if (isset($row[$fieldlabel])) 
		{ 
			$$fieldlabel=$row[$fieldlabel];
			$$fieldlabel=cleanquerydata($$fieldlabel);
		}
	}

	if ((isset($getcustomfieldid)) && ($getcustomfieldid > "0")) { $update = "update"; } else { $update = "new"; }

	if ($getiscustom == "1")
	{
		print "<tr>\n";
		print "<td width=120 class=rowheading>".$getfullname.":</td>";
		print "<td class=row3><textarea name=\"custom".$getfieldid.$update."\" class=\"textarea490x100\">";
		if ((isset($gettext)) && ($gettext != "")) { print $gettext; }
		print "</textarea></td>\n";
		print "</tr>\n\n";
	}
	else
	{
		print "<tr>\n";
		print "<td width=120 class=rowheading>".$getfullname.":</td>";
		print "<td class=row3><input type=text name=\"custom".$getfieldid.$update."\" class=fieldtext490";
		if ((isset($getvarchar)) && ($getvarchar != "")) { print " value=\"".$getvarchar."\""; }
		print "></td>\n";
		print "</tr>\n\n";
	}

	if (isset($getcustomfieldid)) { unset ($getcustomfieldid); }
	if (isset($getvarchar)) { unset ($getvarchar); }
	if (isset($gettext)) { unset ($gettext); }
}
}

Link to comment
https://forums.phpfreaks.com/topic/188719-not-showing-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.