I am wandering if there is a problem with what I am doing right now. It doesn't work so i would think that there is a problem.
Here is what I am trying to do.
I have built an interface where people can store their favorite links from our website. It is based on a paid membership fee.
What I did was that a person would enter the title and comment for the page as well as the password combination.
I am able to put the info into the database. what i would also want to do is check before adding the information into the database that the password combination is valid. but I believe that I can't do that?
This is the code I have on the interface page
<form name="fa" action="http://www.xxx.com/links.php" method="POST" >
<p align="center">
<font face="Arial" size="2"><b>Bonjour Paris Travel Suitcase<img border="0" src="bp_suitcase.gif" width="160" height="200" align =left>--
You may want to add additional information</b></font></p>
<p>
<font face="Arial"><font size="2">URL:
</font>
<input name="url" size=38 value="http://<?php echo $url_new; ?>"><font size="2"><br>
Title:
</font>
<!--webbot bot="Validation" b-value-required="TRUE" --><input name="title" size=38><font size="2"> <br>Username: </font> <!--webbot bot="Validation" b-value-required="TRUE" --><input name="username" size=38 value="-- username --"></font><font face="Arial" size="2"><br>
Password<!--webbot bot="Validation" b-value-required="TRUE" -->
<input name="password" size=38 value="-- password --"></font><font face="Arial" size="2"><br>Comment: </font>
<textarea name="comment" rows=5 cols=32></textarea><font size="2 </font>
<p align="center" style="margin-right: 100px">
</p>
<p align="left">
<input type="submit" value="Submit" name="B1" style="float: left">
</p>
<p align="center" style="margin-right: 100px">
</p>
</form>
The stuff is added correctly into the database. I am trying to make a check for the password combination with the following code on the top of the page.
$result = mysql_query("select * from account where account_username = '$username' and account_password = '$password'");
{
if ($result ==0)
{
echo "You didn't enter a correct password combination";
exit;
}
}
I suspect the problem could be that I work with a POST and might work with GET? Is there a way to combine this somehow?
Andrea