User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 425,788 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,233 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2258 | Replies: 24 | Solved
Reply
Join Date: Dec 2007
Posts: 59
Reputation: dani190 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
dani190 dani190 is offline Offline
Junior Poster in Training

Re: trying to make a survey for school yearbook, need help

  #21  
Jan 12th, 2008
also quick question with this part

<?php
$conn=mysql_connect("localhost","username","password"); 
mysql_select_db("dbname");
$query="select user_id from grads";
$result=mysql_query($query);
$option="";
while($row=mysql_fetch_array($result)) {
   $option.="<option value=".$row['user_id'].">".$row['user_id']."</option>";    
}
if(isset($_POST['submit'])) {
$query="UPDATE TABLE SET VOTE = 1 WHERE USER_ID ='".$_POST['priceisright']."'";	
mysql_query($query);
}
?>

Specifically this part

$option.="<option value=".$row['user_id'].">".$row['user_id']."</option>"; 

The row values what are they supposed to be? If my table is grads and the row is user_id is that all correct?

And i need to know the stuff i said in the previous post about the logins and such.

Also when trying to learn php what is the best way to be doing it? I really do want to learn it but i find whenever i try its really hard... I am using a visual quick pro book on php and mysql right now....

Thanks a lot, Dani
Last edited by dani190 : Jan 12th, 2008 at 11:23 pm.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 240
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: trying to make a survey for school yearbook, need help

  #22  
Jan 12th, 2008
$row here is the recordset returned by the query,
$query="select user_id from grads";
In this case, we are putting the values of user_id in a dropdown list.
To learn the basics of php and mysql, I would suggest you to visit this site.
Php is very easy to learn. Once you learn it, I am sure you can make your own login script.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Dec 2007
Posts: 59
Reputation: dani190 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
dani190 dani190 is offline Offline
Junior Poster in Training

Re: trying to make a survey for school yearbook, need help

  #23  
Jan 13th, 2008
its just i need to finish this asap do you mind helping me this time?
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 240
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: trying to make a survey for school yearbook, need help

  #24  
Jan 13th, 2008
Why don't you hire someone ? I even gave you the link to a function to generate random passwords. I can't write anymore scripts for you. Sorry.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Jan 2008
Posts: 3
Reputation: mad2001_in is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mad2001_in mad2001_in is offline Offline
Newbie Poster

Re: trying to make a survey for school yearbook, need help

  #25  
Jan 16th, 2008
May be you can check php.net its agreat resource
Last edited by cscgal : Jan 16th, 2008 at 8:44 pm. Reason: Fake URL snipped
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the PHP Forum

All times are GMT -4. The time now is 3:14 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC