Add Color the Submit Button in PHP

Asked By 300 points N/A Posted on -

Please help me guys about this one, can I add color the button in PHP?

How can this be done?


Answered By 0 points N/A #104081

Add Color the Submit Button in PHP


Hi Justin,

You can add color to button by adding an inline value for CLASS attribute.

This works fine on my setup running, I have an xampp on my web server and I access the form on the other system via http request.

Take a look at this code snippet below.




<h1>Change button color sample</h1>

<form action="new.php" method="post">

Name: <input type="text" name="fname" />

Age: <input type="text" name="age" />

<input type="button" value="submit" style="color: #FFFFFF; font-family: Arial; font-weight: bold; font-size: 14px; background-color: #72A4D2;" size="15" maxlength="30">





You can have an empty new.php so you can redirect after you clicked the submit button.

Login/Register to Answer

Related Questions