Jump to content

Recommended Posts

OK, I've ran in to a slight problem, I'm editing a script and I'm trying to make it more user firnedly, in order to do this i'm running through the code and tweaking slight things.

 

At the current moment everything is ran off ID's I ahve set up a username field called alias.  I've been doing fine up to know but I've come to problem in teh invite function.

 

The absic concept of what happens is the person enters the id number in to the form and click enters this then does various checks one of which is checking the users information. But when the data gets minipulated and put ni to a database it gets submitted as the user id, and as I am trying to change the id to alias i will ahve to try a new method.

 

What I prepose to do is to try and make it so the person can enter the alias(username) and then i'm trying to create a query which will get the id of the alias entered.

 

What I ahve at the current moment is:

 

    // CHECK INVITED PLAYER INFO

    $invitedinfo=mysql_query("SELECT alias,email FROM users WHERE id='$inviteid' OR alias='$inviteid'");

    if ( is_numeric($inviteid) ) echo $inviteid = $inviteid;

    if ( (string)(float)$inviteid !== (string)$inviteid) echo $inviteid=mysql_query("SELECT alias,id FROM users not sure what to insert here, need help.

 

inviteid is where the person will enter the alias.

 

If you need me to explain myself better or in a different way please say so.  Other wise all help is appreciated.

 

Thanks

Bobby

Link to comment
https://forums.phpfreaks.com/topic/60661-solved-selecting-id/
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.