Sunday, 8 September 2013

Change php text box to button

Change php text box to button

The code below displays a text box on, for example page1.php.
How can i get this to be a button, that will open a new php page, and have
a done button that will take them back to page1.php and populate the
value.
OR
create a popup box with bullets and a done button.
if ( $editmodeison )
print( "<td class='content' align='center'><input
type=\"text\"name=\"edit[$k]\" value=\"" . ( !empty( $row[$k]
)?htmlspecialchars( $row[$k] ) : htmlspecialchars( '' ) ) .
"\" /></td>\n" );
Also i tried this too.
if ( $editmodeison )
print( "<td class='content' align='center'><input
type=\"button\" name=\"edit[$k]\"
onclick='window.location.href="http://localhost/page2.php"value=\"$score"
. ( !empty( $row[$k] )?htmlspecialchars( $row[$k] ) :
htmlspecialchars( '' ) ) . "\" /></td>\n" );
I tried to redirect it to page 2 and i am using a $_GET to pull it from
the URL. the error i get is
syntax error, unexpected T_STRING in
/home/content/59/11513559/html/bg/page1.php on line 87

No comments:

Post a Comment