Advertisement

04.22.2008 at 09:02AM PDT, ID: 23343472
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.1

Beginning with PHP

Asked by easynow111 in PHP and Databases, Web Languages/Standards, PHP Scripting Language

Tags: , , , ,

Experts,

I am just starting to familiarise myself with PHP. For the purposes of testing i am linking to an Access database (because im on IIS). In the future i plan to move to mysql (apache).

I have located and modified a simple DB call authentication type script which i cant seem to get to work. I have tested the DB connection and its fine (www.doingitforswing.co.uk/test.php)

I think im mis-defining the variables i use to store the GET requests... i beluieve an experienced eye will pick this up pretty easily, so i'd appreciate the syntax help. (see code below)

The page (and error) can be found at www.doingitforswing.co.uk/pass.php [please try to login using Admin / password].

Regards
EasynowStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Swing</title>
<style>
.Content    		{border: 2px dotted black #bbbbbb}
h2           		{ color:#ff0000; text-decoration: bold; font: normal 24px Arial; margin-left: 25px;margin-top: 25px;}
p           		{ color:#000000; font: normal 12px Arial; margin-left: 25px; line-height: 15pt}
td           		{ color:#000000; font: normal 12px Arial; margin-left: 25px; line-height: 15pt}
a			{ color: #562242; text-decoration: none;  }
a:hover			{ color: #ff0000; text-decoration: none}
body			{ margin:0px}
</style>
</head>
 
<body bgcolor="efefef">
<table border="0" width="100%" id="table1">
	<tr>
		<td width="20%">&nbsp;</td>
		<td valign="top">
		<table border="0" width="828" id="table2" cellspacing="0" cellpadding="0">
			<tr height="104">
				<td colspan="5"><img border="0" src="Banner.jpg" width="827" height="104" vspace="0"></td>
			</tr>
			<tr height="21">
				<td><a href="index.htm"><img id="Menu1" src="Menu1OFF.jpg" onmouseover="this.src='Menu1ON.jpg'" onmouseout="this.src='Menu1OFF.jpg'" border="0" width="113" height="21" align="left" hspace="0" vspace="0"></a>
				<a href="Schedule.htm"><img id="Menu2" src="Menu2OFF.jpg" onmouseover="this.src='Menu2ON.jpg'" onmouseout="this.src='Menu2OFF.jpg'" border="0" width="147" height="21" align="left" hspace="0"  vspace="0"></a>
				<a href="Charity.htm"><img id="Menu3" src="Menu3OFF.jpg" onmouseover="this.src='Menu3ON.jpg'" onmouseout="this.src='Menu3OFF.jpg'" border="0" width="198" height="21" align="left" hspace="0" vspace="0"></a>
				<a href="Contact.htm"><img id="Menu4" src="Menu4OFF.jpg" onmouseover="this.src='Menu4ON.jpg'" onmouseout="this.src='Menu4OFF.jpg'" border="0" width="170" height="21" align="left" hspace="0" vspace="0"></a>
				<img id="Menu5" src="Menu5OFF.jpg" border="0" width="199" height="21" align="left" hspace="0" vspace="0"></td>
			</tr>
			<tr>
				<td colspan="5" style="background-image: url('BackgroundDecks.jpg'); valign:bottom">
				
				<table width="820px" height="700px" border="0" cellspacing="0" cellpadding="0">
					<tr valign="top" ><td rowspan="2" width="301">
					<h2><b>the schedule</b></h2> 
					<p><font color="#FF0000"><b>0800-1100</b></font> 	 The Breakfast Show : R&B & Soul flavours, hosted by Jay Rachet</p>
					<p><font color="#FF0000"><b>1100-1300</b></font>       - The Connoisseur Corner : Modern & 70s Soul, with Mark Collison</p> 
					<p><font color="#FF0000"><b>1300- 1500</b></font> 	 The Swing Session : Swing Beat & Hip Hop from the 80s & 90s, courtsey of Dr Psycho</p> 
					<p><font color="#FF0000"><b>1500  1800</b></font> 	 Chat & Charm: Pure Soul, Pure Madness, with Mike Artwell</p>
					<p><font color="#FF0000"><b>1800  2000</b></font> 	 The Jazz Rooms : A mix of Jazz, Fusion and Funk, from Paul Brady</p>
					<p><font color="#FF0000"><b>2000  2200</b></font> 	 Mad Soul Flava : A sublime mixture of Soul, courtesy of Tony Angus</p>
					<p><font color="#FF0000"><b>2200  0000</b></font> 	 Mix & Blend : Hip Hop, R&B and Old Soul from Michael Lewars</p>
					<p><font color="#FF0000"><b>0000  0200</b></font> 	 Licks for the Ladies : Pure 90's Beats, with DJ Ghane</p>
					<p><font color="#FF0000"><b>0200  0400</b></font> 	 Tony Cox will be playing a mixture of soul & swing beat</p>
					<p><font color="#FF0000"><b>0400  0600</b></font> 	 Boogie Oogie : Boogie & Soul Beats, with Bob Baker</p>
					<p><b><font color="#FF0000">0600  0800</font></b> 	 The Soul Omelette : An array of Soulful gems with Ollie</p>
					<p><b>Support us in our aims, remember we're doing it for Swing</b></p>
					</td>
					<td height="100" align="right"><img src="ScheduleImage1.jpg" vspace="30"></td>
					<td height="100" align="right"><img src="ScheduleImage2.jpg" vspace="30"></td>
					<td height="100" align="right"><img src="ScheduleImage3.jpg" vspace="30"></td>
					</tr>
				<tr><td height="600px" colspan="3" valign="top" align="middle"><div class="content" style="width:320px;height:100px">
					<table style="width:420px;height:100px"><tr><td colspan="3" align="left">
 
<?php
$addTask=$_GET['Task'];
	if ($addTask == "") {
    		$addTask="login";
	}
if ($addTask=="login") {
?>
<h2>Login</h2>
	<p>Please enter username and password</p>
		<form method="get" action="pass.php"> 
		<blockquote><table>
		       <tr><td>Name: </td><td><input style="width:200px" type="text" name="Name" size="20"><input type="hidden" name="Task" value="ProceedLogin"></td></tr>
		       <tr><td>Password: </td><td><input style="width:200px" type="password" name="Password" size="15"></td></tr>
		       <tr><td colspan="2" align="right"> Click here to enter --> <input type="Submit" value="Submit"></td></tr>
		</table> 
		</form>
<?php
} else {
 
$db = "D:\home\Default\doingitforswing.co.uk\Data\MSARTICLES.mdb";
 
$conn = new COM("ADODB.Connection");
$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db");
$addName=$_GET['Name'];
$addPassword=$_GET['Password'];
$sql = "SELECT   *
        FROM     SwingTable
	WHERE Name='$addName'";
 
$rs = $conn->Execute($sql);
while (!$rs->EOF):
		if ($rs->Fields['Password']->Value == $addPassword) {
		?>
		<p>Success</p>
		<?php
		} else {
		?>
		<p>Fail</p>
		<?php
		}
		?>
<?php $rs->MoveNext() ?>
<?php endwhile  ?>
<?$rs->Close(); ?>
<?$conn->Close(); ?>
<?} ?>
 
</td></tr>
				</td></tr></table></div>
 
				</td></tr></table>
			</td>
			</tr>
		</table>
		</td>
		<td width="20%">&nbsp;</td>
	</tr>
</table>
 
</body>
 
</html>
[+][-]04.22.2008 at 09:11AM PDT, ID: 21412568

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2008 at 09:14AM PDT, ID: 21412611

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.22.2008 at 09:25AM PDT, ID: 21412743

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.22.2008 at 09:33AM PDT, ID: 21412834

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.2008 at 09:40AM PDT, ID: 21412910

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 02:14AM PDT, ID: 21418734

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 02:23AM PDT, ID: 21418791

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 02:35AM PDT, ID: 21418831

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 02:44AM PDT, ID: 21418873

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 02:49AM PDT, ID: 21418890

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.2008 at 03:03AM PDT, ID: 21418962

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP and Databases, Web Languages/Standards, PHP Scripting Language
Tags: PHP, PHP, IE, www.doingitforswing.co.uk/pass.php, Notice: Undefined index: Task in D:\home\Default\doingitforswing.co.uk\htdocs\pass.php on line 60
Sign Up Now!
Solution Provided By: logudotcom
Participating Experts: 3
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628