I'm a student new to MySQL working on a website containing information about elementary school students. Our instructor has required that the website support multiple administrator logins. I have created the table containing the ADMIN data, but I am a bit confused as to how to retrieve these values. I believe I am to use a mysql_query, but I am not exactly sure how to structure this statement.
Here is what I have so far. Thanks in advance:
--Table: ADMINS
create table ADMINS (
U_ID integer primary key AUTO_INCREMENT,
U_NAME char(25) not null,
U_PSSWD char(25) not null
);
--Insert ADMINS data
insert into ADMINS values('t_wallace', 'maplesyrup');
insert into ADMINS values('t_hammett', 'pancakes');
insert into ADMINS values('q_malaki', 'bacon');
Here is my PHP so far:
<html><body>
<?php
<input type="text" name="u_name"/>
<br/>
<input type="password" name="pss_word"/>
<br/>
<input type="submit" value="Submit" />
</form>
$con = mysql_query --Here is where I am confused as to retrieve the U-Name & U_PSSWD values.
$login = mysql_connect() -- I assume once I receive assistance with my $con variable, I will be able to figure this out.