Also plz tell me what php script to write for the following:-
There should be options to enter a username and password (i know how to do this i.e. by using form ) and to click on a login button (just like how we enter into yahoo mail). Now- after clicking the login button it has to be checked whether the username and password entered are valid or not (they are stored in a MySQL table) and if valid then control should navigate to a new page say list.php
There should be a form to enter a user s username and password with a login button. Let there be multiple users so there are multiple sets of username and password on entering any of which a particular php page should open up. These username and password sets will be stored in a table inside a MySQL database. So plz tell me how to write the php code which checks for valid username and password and then redirects to a page.
There should be a form to enter a user s username and password with a login button. Let there be multiple users so there are multiple sets of username and password on entering any of which a particular php page should open up. These username and password sets will be stored in a table inside a MySQL database. So plz tell me how to write the php code which checks for valid username and password and then redirects to a page.
I am trying to select all the values from a column called "08" in reverse numerical order. When I run the following- every row returned has a value of 8- even though the actual values in the database are numbers like 236- 36- and 5. Why does the following Select statement not return the actual numerical values in the column called "08"? The column called "08" has a field type of INT(08).
$result = mysql_query ("SELECT 08 FROM May08 ORDER BY 08 DESC");
while ($row = mysql_fetch_array ($result)) {
$val=$row[ 08 ];
echo $val;
}
mysql_query("UPDATE songs SET rating = ".$rating." WHERE song_name = ".$song_name." WHERE username = ".$username." ")or die ("NOT WORKING!");
Okay- the code above doesn t work- I want it to double confirm the row that has the song_name = $song_name and the username = $username. Uh.. there s php in there too.
Thanks!
I have the following query for mysql but it keeps giving me an error and I am not sure why
"SELECT pd.products_name- pd.products_description- pd.products_url- p.products_quantity- p.price-p.products_weight-p.products_model-p.product_status from products_description pd- products d- where p.products=
{$_GET[ id ]}
and pd.products_id=
p.products_id "
I realize that I am not gaurding against the SQL injection I was plugging value in for testing.
the problem is in the where statement
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near where p.products= 8574 and pd.products_id= p.products_id at line 1
Can someone help please?
No comments:
Post a Comment