BigBobby Posted July 18, 2007 Share Posted July 18, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/60661-solved-selecting-id/ Share on other sites More sharing options...
BigBobby Posted July 19, 2007 Author Share Posted July 19, 2007 I ahve fixed this, and it is now working. Thanks you may now close this topic. Quote Link to comment https://forums.phpfreaks.com/topic/60661-solved-selecting-id/#findComment-302444 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.