473,473 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how can i connect my page of "sign-up" to a database?

8 New Member
Help Me Please...some Ideas On Php...
Mar 16 '08 #1
11 1274
ronverdonk
4,258 Recognized Expert Specialist
In order to help you, provide some more information. What do you mean by 'connect my page'? And how do you want to 'connect' youyr page to a database?

In short, explain your problem in a plain english.

ROnald
Mar 16 '08 #2
reese
8 New Member
Im having a problem on my page,,
Im doing a page that will allow a person to join my group, but
I dont know how to connect the account information they've entered.,,to my database..
Mar 16 '08 #3
ronverdonk
4,258 Recognized Expert Specialist
The only way to try to help you is that you show the code that is involved here. So show it and do not forget to enclose any code within the appropriate code tags.

P.S. It does not help at all to write your text in capitals. They will be removed.

Ronald
Mar 16 '08 #4
reese
8 New Member
thanks for reminding me not to use all caps..
should i put these two php code in a notepad??
[php]1)
<?php
require("connection.php");
$n=$_POST['name'];
$sn=$_POST['surname'];
$g=$_POST['gender'];
$add=$_POST['address'];
@mysql_query("Insert into information values('" . $n . "','" . $sn . "','" . $g . "','" . $address . "')");
?>

2)
<?php
if($x=@mysql_connect("localhost","a8728531_test"," jdin04"))
{echo"CONNECTED";}
else
{echo"NOT CONNECTED";}
$x=@mysql_select_db("a8728531_endangered1");
?>[/php]
Mar 16 '08 #5
reese
8 New Member
please bear on me, my errors, im still studying php...
Mar 16 '08 #6
ronverdonk
4,258 Recognized Expert Specialist
please bear on me, my errors, im still studying php...
Before you continue read the Posting Guidelines, especially the part about enclosing any code with the appropriate code tags! How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

.. So show it and do not forget to enclose any code within the appropriate code tags. ...
I have asked that specifically.

Ronald
Mar 16 '08 #7
ronverdonk
4,258 Recognized Expert Specialist
You have not shown all code! Where is the code of the form that is used to sign/up a new member? And this time enclose it within code tags!

Ronald
Mar 16 '08 #8
reese
8 New Member
[php]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>endangered animals.com</title>
<style type="text/css">
<!--
body {
background-image: url(http://i246.photobucket.com/albums/g...z/realbg.jpg);
}
body,td,th {
color: #663300;
}
.style2 {
font-family: "Palatino Linotype";
font-size: 36px;
}
.style5 {font-family: "Palatino Linotype"; font-size: 18px; }
.style7 {
font-size: 16px;
font-weight: bold;
}
.style10 {font-family: "Palatino Linotype"; font-weight: bold; }
.style13 {font-size: 16px}
-->
</style></head>

<body>
o?o
<div align="center">
<blockquote>
<p align="left">&nbsp;</p>
<p align="center"><img src="http://i246.photobucket.com/albums/gg90/dingdongcortez/logo.jpg" align="left" width="113" height="106" /> </p>
<blockquote>
<blockquote>
<blockquote>
<p align="left"><br />
<br />
<span class="style2"> poetspride.890m.com</span><br />
</p>
<div align="right"></div>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</div>
<blockquote>
<blockquote>
<p>&nbsp;</p>
<hr width="800" color="#006600" />
<blockquote>
<p class="style5">Hi there! <br />
Please fill up the needed informations for you to sign up. </p>
</blockquote>
</blockquote>
<div align="center" class="style4">
<blockquote><p align="right"><span class="style7">Have already your account? </span><br />
<form action="log-inplng.html" method="post"></p>
<div align="right">
<input type="submit" name="log-in" value="Log-in" />
</div></form>

<blockquote>
<blockquote>
<div align="left">
<p class="style5">1.Tell us about yourself...</p>
<blockquote>
<form id="form2" name="form2" method="post" action="connection.php">
<div align="left">
<table border="0">
<tr><td><span class="style7">Name:</span></td>
<td><input type="text" name="name" size="size"></td></tr>
<tr><td> <span class="style7">Surname:</span></td>
<td><input type="text" name="surname" size="size" /></td></tr>
<tr><td><span class="style7" name="gender">Gender:</span></td>
<td><select size="1" multiple="multiple" name="gender"/>
<option value="Select One">Select One</option>
<option value="Male">Male</option>
<option value="Female">Felmale</option></td></tr>
<tr><td><span class="style7">Address:</span></td>
<td><select size="1" name="address"/>
<option value="Select One ">Select one</option>
<option value="Afghanistan ">Afghanistan</option>
<option value="Algeria">Algeria</option>
<option value="Argentina">Argentina</option>
<option value="Australia">Australia </option>
<option value="Austria">Austria</option>
<option value="Bangladesh">Bangladesh</option>
<option value="Bolivia"> Bolivia</option>
<option value="Botswana">Botswana</option>
<option value="Brazil">Brazil</option>
<option value="Brunei">Brunei </option>
<option value="Cambodia ">Cambodia </option>
<option value="Canada">Canada</option>
<option value="China ">China </option>
<option value="Colombia">Colombia</option>
<option value="Denmark">Denmark</option>
<option value="Egypt ">Egypt </option>
<option value=" Finland"> Finland</option>
<option value="France ">France </option>
<option value="Germany ">Germany</option>
<option value="Greece">Greece</option>
<option value="Hong Kong ">Hong Kong </option>
<option value="India ">India </option>
<option value="Indonesia ">Indonesia </option>
<option value="Japan ">Japan </option>
<option value="Kenya ">Kenya </option>
<option value="Kuwait">Kuwait</option>
<option value="Laos">Laos</option>
<option value="Malaysia ">Malaysia </option>
<option value="New Zealand ">New Zealand </option>
<option value="Oman ">Oman </option>
<option value="Pakistan ">Pakistan </option>
<option value="Philippines ">Philippines </option>
<option value="Qatar">Qatar</option>
<option value=" Russia "> Russia </option>
<option value=" Singapore"> Singapore</option>
<option value="Taiwan ">Taiwan </option>
<option value="United States ">United States </option>
<option value="Venezuela ">Venezuela </option>
<option value="Wallis and Futuna ">Wallis and Futuna </option>
<option value=" Yemen "> Yemen </option>
<option value=" Zimbabwe "> Zimbabwe </option>
<option value="Others ">Others</option>
</td></tr>
</table>
</form></div>
<p>&nbsp;</p>

<div align="left">
<p class="style5">2. Create your :</p>
<form id="form2" name="form2" method="post" action="log-in.html">
<table border="0">
<tr><td><span class="style7">Username:</span></td>
<td> <input type="text" name="username" size="size"></td></tr>
<tr><td><span class="style7">Password:</span></td>
<td><input type="password" name="password" size="20" /></td></tr>
<tr><td><span class="style10"><span class="style7">Re-type Password</span>:</span></td>
<td><input type="password" name="repassword" size="20" /></td></tr>
<tr><td><input type="submit" name="submit" value="Submit" /></td></tr>
</table>
</form></div>
</body>
<?php
require("connection.php");
$n=$_POST['name'];
$sn=$_POST['surname'];
$g=$_POST['gender'];
$add=$_POST['address'];
@mysql_query("Insert into information values('" . $n . "','" . $sn . "','" . $g . "','" . $address . "')");
?>
</html>[/php]
Mar 16 '08 #9
reese
8 New Member
[php]<?php
if($x=@mysql_connect("localhost","a8728531_test"," jdin04"))
{echo"CONNECTED";}
else
{echo"NOT CONNECTED";}
$x=@mysql_select_db("a8728531_endangered1");
?>[/php]
Mar 16 '08 #10
reese
8 New Member
the 2nd one is the content of connection.php declared in the 1st one..i wanna cry,,its not working, whatever i do and try on it..
Mar 16 '08 #11
ronverdonk
4,258 Recognized Expert Specialist
After 3 warnings, you have just received your last warning by personal mail. I will close this thread until you have acknowledged that you have read the Posting Guidelines and will adhere to them.

This does not work the way it is constructed. You have 3 forms with action to 3 different scripts and only 2 submits. That is the first thing to clear up.
  • you have 3 forms on 1 page:
    • LOGIN: <form action="log-inplng.html" method="post"></p>
    • Tell us about yourself: <form id="form2" name="form2" method="post" action="connection.php">
      This one does not have a SUBMIT! You must make the second and third form ONE form.
    • Create your : <form id="form2" name="form2" method="post" action="log-in.html">
what is connection.php, what is login.html and what is log-inplng.html??
  • P.S. gender is a multiple select drop down box, but you have not close </select> the select list, so no options show. And why would you do a multiple select on gender?
Ronald
Mar 16 '08 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: ian justice | last post by:
Before i post actual code, as i need a speedyish reply. Can i first ask if anyone knows off the top of their head, if there is a likely obvious cause to the following problem. For the moment i've...
5
by: msnews.microsoft.com | last post by:
Hi, I am having a problem that the gateway I am working with removes the "=" sign from values in the postfield that are empty. Example: page.asp?aa=&ff=&xx=12 become: page.asp?aa&ff&xx=12....
9
by: cooldv | last post by:
i know how to replace the sign " when SUBMITTING a form in asp by this code: message = Replace(usermessage, "'", "''"). My problem is DISPLAYING data in an asp FORM, from an an access database,...
6
by: Ji | last post by:
Hi I have a sting which is -- This is a "dog" ! then I needed to named it to a string variable such as Dim S as string S = "This is a "dog"! " But it does not work ,how to make it? Thanks
0
by: Norman Yuan | last post by:
I posted this issue a while ago. After moveing the ASP.NET 1.1 app to a brand new server, the same problem still there. System: Winows2003 server std. .NET 1.1 App: Invoicing system Problem:...
5
by: SagarDoke | last post by:
suppose there are 2 files "1.html" and "login.html". from "1.html" i am opening second page "login.html". "1.html" contain one button with value "signin". when i clicked on that button login form...
7
by: ankitoshniwal | last post by:
Hello, I have been having this problem for the whole day today, so even after i googled for the solution i was not able to get one, so i had to post to this forum. I had checked the solutions...
4
by: K Viltersten | last post by:
It seems that when i try to write a percentage sign (%) into the event log using WriteEntry method, the log believes that i'm refering to some variable from command line. Is it a special...
2
by: JFKJr | last post by:
Hello everyone! I am a new beginner to ASP.NET, I have created two pages page1.aspx, page2.aspx and I am trying to pass course name value to page2.aspx from page1.aspx using the following URL: ...
4
by: umarajeswari | last post by:
Hi, my question is , say i have file in this following path /tmp/usubramani/hsbc/inbound/cambio3.txt 1234 4567 678905678
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.