Jump to content

Help a newbie.


notops

Recommended Posts

Hi guys,

 

Im pretty new to PHP and Mysql, and im trying to fix a script. I have been reading alot about mysql_fetch_array etc, but i could still need some help. Especially about one thing.

 

The script i want to make, is one where a user can get out infomation about his "account" without logging in. He simply enters his usernumber and gets the two other rows in the database.

 

But i really cant figure out, how to let the user decide what colums that should be shown. I set the usernumber as primary in the db.

 

If anyone could point me in a direction here, it would be apreciated. As im doing this most to learn, i dont really want a complete howto, or finished script.

 

Thanks

Link to comment
Share on other sites

But i really cant figure out, how to let the user decide what colums that should be shown

 

You mean each user can save in some fashion, which or both of the 2 rows they'd like to be made visible when someone enters their user ID?

Link to comment
Share on other sites

I will save the info. Im gonna use it to show the users how many "bonus points" they have. So i want a script that tells the user how many points he got when he enters hes id. So the first Row wil be primary usernames, second will be full name, and the last one will be the bonus points, that i will make another script to edit.

 

So if the user enters his username he will be able to see the other two columns after his username.

 

So it will be like user1 name points

                      user2 name points

etc.

Link to comment
Share on other sites

Yeah i know im selecting columns, i never said anything else. Im not really into reading and learning all php and mysql from scratch, rather learn while i write. I tried googling 1 hour for any text about doing this, but cant find a single answer.

Link to comment
Share on other sites

Yeah i know im selecting columns, i never said anything else. Im not really into reading and learning all php and mysql from scratch, rather learn while i write. I tried googling 1 hour for any text about doing this, but cant find a single answer.

 

Why not just pay someone to write it? You're putting the cart before the horse as they say.

 

You will save a lot of time and energy if you just start from scratch and learn the right way.

Link to comment
Share on other sites

Well, its not really that important. So i dont feel like paying anyone to do it.

 

I do know a bit php, connecting to mysql dbs etc, but not how write a script where it searches the first row for the user input and then puts out the whole column.

 

But, i guess ill try asking google for some more help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.