Hello friends,

let us cosider

$a[1]['en'] = "ok";

and we have a form with submit option as following

<form method=post>
	<td>name :</td>
	<td><input type=text name=PlanName></td>

<td><input type=submit name=submit value="xx"></td>

and its php code

if(isset($submit) && $submit == 'xx')
$q1 = "insert into table set
name = \"$name\" ";
mysql_query($q1) or die(mysql_error());

at the php code ($submit) is xx
at the html code (value) is xx


when i exchange xx with $a[1] = "ok";

where i write in PHP CODE

if(isset($submit) && $submit == '{$a[957][$lang]}')

and in HTML CODE

<input type=submit name=submit value="<? echo $a[1][$lang]; ?>">

it didn't works

so how can i make value and submit the same using that lang variables

$a[1]['en'] = "ok";

thanks in advance

8 Years
Discussion Span
Last Post by omoabobade

Don't think you can use {} inside single quotes in php. Anyhow, your html and php are messy. You haven't enclosed attribute values in quotes. You've also used short tags. Your input tags should be 'self-closing'.


I'm trying to believe that you intentionally write your code the way you did because if not then you need to check your syntax.
And short tags (<? ?>) are not advisable and not the best practise in php cos it might confuse with your xml tag.
It seems that it is not the value being posted by submit that you are using in in your if statement condition so check that and hope it helps.
Shalom Shalom.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.