Add Color the Submit Button in PHP

Asked By 300 points N/A Posted on -
qa-featured

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

How can this be done?

Thanks

SHARE
Answered By 5 points N/A #104081

Add Color the Submit Button in PHP

qa-featured

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.

<html>

<head>

<body>

<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">

</form>

</body>

</head>

</html>

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

Related Questions