Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,207,563 members, 7,999,425 topics. Date: Monday, 11 November 2024 at 07:27 AM |
Nairaland Forum / Science/Technology / Programming / Getting User Data Script...please Help Me Out (1273 Views)
Do You Have Shipping Site Website Script? Please Contact Me (2) (3) (4)
Getting User Data Script...please Help Me Out by cr80vity(m): 12:38pm On Feb 03, 2016 |
please can sumone help me out with the php script to get user data so dat wen d person logins in, it wil echo his/her username (e.g hello creativity)...but I want d script to use func_num_args together with func_get_args....I want it in a way dat d query select can b in array so I can choose to either echo $username or $firstname, etc...please help...I dnt mind if its done using function cux m told to write a function for it nd den call it but if dere s any oda way I stil appreciate...Tanks in anticipation |
Re: Getting User Data Script...please Help Me Out by Nobody: 3:34pm On Feb 03, 2016 |
Very funny you want to echo two parameters as one? Why don't you just create a textbox and get the input directly then you do something like this
Then in your program you can access it directly as
I'm coding from mobile, hope you get the idea. |
Re: Getting User Data Script...please Help Me Out by cr80vity(m): 4:00pm On Feb 03, 2016 |
gimakon:m usin php procedural and mysql |
Re: Getting User Data Script...please Help Me Out by A7(m): 5:07pm On Feb 03, 2016 |
Create two input fields with name='username' and name='firstname' and a submit button, use "get request". Code to use: If(isset($_GET['submit'], $_GET['username'], $_GET['firstname']) &&!empty($_GET['username']) &&!empty($_GET['firstname'])){ $print_out['username'] = $_GET['username']; $print_out['firstname'] = $_GET['firstname']; //this will return both username and firstname: echo "<pre>", print_r($print_out),"</pre>"; //to echo just username or firstname, use: echo $print_out['username']; Or echo $print_out['firstname']; } Nb: You don't need arrays, you can individually echo each "get value" like: echo $_GET['username']; Or echo $_GET['firstname']; And what do you mean by query select? Is it mysql select query? If so use: $sql = (put your select statement here); $query = (execute the query here); $row = mysqli_fetch_assoc($query); echo $row['the value you want to echo out e.g username']; |
Re: Getting User Data Script...please Help Me Out by Nobody: 6:57pm On Feb 03, 2016 |
cr80vity: Meaning you want to fetch the user and echo his name directly from the base, thats what u mean ja? |
Re: Getting User Data Script...please Help Me Out by cr80vity(m): 7:55pm On Feb 03, 2016 |
A7:thanks alot...Pls wil d sql code echo d username of d user wenever he logs in like (hello Creativity) creativity bin d username |
Re: Getting User Data Script...please Help Me Out by losprince(m): 9:07pm On Feb 03, 2016 |
you want to be a programmer but you don't want to write code |
Re: Getting User Data Script...please Help Me Out by A7(m): 9:30pm On Feb 03, 2016 |
cr80vity: If the user earlier signup on the system and you stored the signup details in mysql db and upon signing in you get the users details and query a match from the database and if a match is found, YES IT WILL. |
Re: Getting User Data Script...please Help Me Out by cr80vity(m): 6:45am On Feb 04, 2016 |
losprince:boss v written d code bt I didnt get it dats y I came here.to ask |
Re: Getting User Data Script...please Help Me Out by cr80vity(m): 6:46am On Feb 04, 2016 |
A7: ok boss... |
(1) (Reply)
Add Nigeria states to Woocommerce / Be Trained And Certified / HELP!!! I Want To Learn Programming Language
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 17 |