What i am doing is creating a list box from a db and echoing the db username into the list box (all working good)($_POST['list_box'] )
im then doing a while statement to gather all the usernames then creating an array
Im then assigning a variable $frm_username = $_POST['username'] (from the array)
and a variable for the auto increment column $frm_user_id = $_POST['id']
My query is
$sql = "SELECT * FROM table_name WHERE username = ($_POST['list_box'] )"
The syntax above may not be correct as i have quickly typed this up at work but hope you get the idea
the problem im having is when the username is in the list box more than once and im calling all the data from that username it as no way to differ between both names that’s why i added the id column to try and make it look at two fields in the db rather than just the username but not sure how to call this in my $sql variable
Popularity Can Be Measured
Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients. This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose.
It turns out that Yaho…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing.
Set up your basic HTML file. Open your form tag and set the method and action attributes.:
Set up your first few inputs one for the name and …