Jump to content

Changing font and style of php


cfgcjm

Recommended Posts

I have a login script:

 

<?php
/* Login Script */
require ('mysql.php');
session_start();

if (isset ($_POST['submit'])) { // Check to see if the form has been submitted
$username = $_POST['username'];
$password = md5 ($_POST['password']); // we MD5 encrypted the password at registration, 
									  // so we must do this on the login as well

// See if the user exists
$sql = "SELECT * FROM users WHERE username='$username' AND password='$password'";
if ($r = mysql_query ($sql)) {
	$row = mysql_fetch_array ($r);
	$num = mysql_num_rows ($r);

	if ($num > 0) { // if there is a row with that username/password, the user exists
		// Now we can assign some SESSIONS, so we can verify on later pages that the user is "logged in"
		$_SESSION['users_id'] = $row['users_id'];
		$_SESSION['username'] = $row['username'];
		$_SESSION['loggedin'] = TRUE; // This is where we will check to see if the user is logged in

		header("location:portal.php"); // Use is not logged in. Send to notloggedinpage.php
      exit;
	} else {
		// User does not exist
		print 'Invalid Username/Password!';
	}
} else {
	// The query failed
	print 'Error:' . mysql_error(); // print the MySQL error
}
} else { // The form was not submitted
// Display the form

print '<form action="login.php" method="post">
	<table border="0">
	  <tr>
	    <td align="right">Username:</td>
		<td align="center"><input type="text" name="username" /></td>
	  </tr>
	  <tr>
	    <td align="right">Password:</td>
		<td align="center"><input type="password" name="password" /></td>
	  </tr>
	  <tr>
	    <td></td>
		<td><input type="submit" name="submit" value="Submit" /></td>
	  </tr>
	</table>
</form>';

}


?>

and i was wondering how to change the font style & color. I'm using dreamweaver CS3 and this is what it displays in design view

1.jpg

Link to comment
https://forums.phpfreaks.com/topic/71176-changing-font-and-style-of-php/
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.