[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[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.4

Creating a working registration form with PHP

Asked by gabrielPennyback in PHP and Databases, MySQL Server, Adobe Dreamweaver

Tags: PHP

Please take a look at this page and let me know how to turn it into a real functioning registration form: http://www.discretedata.com/PHP/Registration.php
I have a  database on my server, and I've attached the code for the page. Hopefully that will give you enough information to tell me what I need to know. I'm including Dreamweaver as a zone in case there are ways to do this automatically within Dreamweaver.

Thanks,

John

By the way, if you can tell me a better way for me to get the look I want for the form fields, let me know. The submit button in particular doesn't seem to want to be in its own div.

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:
121:
122:
123:
124:
125:
126:
127:
128:
129:
<?php require_once('../Connections/discrete_Basic1.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
mysql_select_db($database_discrete_Basic1, $discrete_Basic1);
$query_rs_press = "SELECT * FROM Members";
$rs_press = mysql_query($query_rs_press, $discrete_Basic1) or die(mysql_error());
$row_rs_press = mysql_fetch_assoc($rs_press);
$totalRows_rs_press = mysql_num_rows($rs_press);
 
 
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>My First Table</title>
<style type="text/css">
<!--
body,td,th {
	font-family: Gill Sans MT;
}
.textBox{width:400px;  border: 1px solid #333; padding: 10px 20px}
.textBox2{width:400px; color:#999;  border: 1px solid #999; padding: 10px 20px}
.record{clear:both; padding: 5px 0 0 0}
.field{float:left; width:150px; text-align:right; padding: 0 5px}
.field2{float:left; width:150px; text-align:left; padding: 0 5px}
.spacer{height:5px; clear:both}
-->
</style></head>
 
<body>
 
<div class="textBox">
I'd like to insert a registration form here which upon submit will add the user's info to the database. What is everything I need to do in order to accomplish that? These are the fields I have in the table named &quot;Members&quot;:</div>
<div class="spacer">&nbsp;</div>
<div class="spacer">&nbsp;</div>
<div class="spacer">&nbsp;</div>
<div class="spacer">&nbsp;</div>
 
<form name="form1" method="post" action="">
 
<div class="record">
<div class="field">  <label>First Name </label></div>
<div class="field">  <input type="text" name="First Name" id="First Name"></div>
</div>
  <br>
<div class="record">
<div class="field">  <label>Last Name </label></div>
<div class="field">  <input type="text" name="Last Name" id="Last Name"></div>
</div>
<div class="record">
<div class="field">  <label>Email address </label></div>
<div class="field">  <input type="text" name="Email address" id="Email Address"></div>
</div>
<div class="record">
<div class="field">  <label>Password </label></div>
<div class="field">  <input type="text" name="Password" id="Password"></div>
</div>
  <br>
<div class="record">
<div class="field">  <label>Street Address</label></div>
<div class="field">  <input type="text" name="Street Address" id="Street Address"></div>
</div>
<div class="record">
<div class="field">  <label>City </label></div>
<div class="field">  <input type="text" name="City" id="City"></div>
</div>
<div class="record">
<div class="field">  <label>State / Province</label></div>
<div class="field">  <input type="text" name="State" id="State"></div>
</div>
  <br>
<div class="record">
<div class="field">  <label>Zip / Postal code</label></div>
<div class="field">  <input type="text" name="Zip" id="Zip"></div>
</div>
<div class="record">
<div class="field">  <label>Country</label></div>
<div class="field">  <input type="text" name="Country" id="Country"></div>
</div>
<div class="spacer">&nbsp;</div>
 
<div class="record">
<div class="field">&nbsp;</div>
<div class="field2"> 
<form name="form1" method="post" action="">
    <input type="submit" name="submit" id="submit" value="Submit">
</form>
</div>
 
<div class="spacer">&nbsp;</div>
<div class="spacer">&nbsp;</div>
<div class="spacer">&nbsp;</div>
<div class="spacer">&nbsp;</div>
<div class="textBox"> This is what is in the PHP at the head of the page in code view:</div>
<p>&nbsp;</p>
 
</body>
</html>
<?php
mysql_free_result($rs_press);
?>
 
Related Solutions
Keywords: Creating a working registration form wi…
 
Loading Advertisement...
 
[+][-]03/25/09 08:18 PM, ID: 23987041Accepted Solution

View this solution now by starting your 30-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, MySQL Server, Adobe Dreamweaver
Tags: PHP
Sign Up Now!
Solution Provided By: adrian_brooks
Participating Experts: 3
Solution Grade: A
 
[+][-]03/23/09 06:40 PM, ID: 23964046Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/23/09 07:45 PM, ID: 23964338Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/23/09 09:19 PM, ID: 23964659Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/23/09 11:32 PM, ID: 23965214Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/24/09 03:37 PM, ID: 23974154Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/24/09 03:40 PM, ID: 23974175Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/24/09 03:46 PM, ID: 23974216Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/24/09 03:48 PM, ID: 23974238Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/24/09 07:20 PM, ID: 23975521Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/24/09 07:40 PM, ID: 23975620Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/24/09 07:43 PM, ID: 23975642Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/24/09 09:26 PM, ID: 23976060Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/25/09 11:25 AM, ID: 23982940Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/25/09 07:16 PM, ID: 23986793Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/26/09 06:30 AM, ID: 23990092Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/26/09 04:40 PM, ID: 23996812Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/29/09 05:10 PM, ID: 24015214Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/30/09 02:30 PM, ID: 24023585Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/25/09 12:32 AM, ID: 24231163Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625