Fill Fields When User Selects User From DB
I have a field with a selectbox which contains a list of client names and several other fields which display information from the DB.
I need to be able to make the fields change to the appropriate information when a user is selected from the select box. Can anybody please give me an example of a bit of code that will do this?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Validation Function For All User Fields?
Hi, I'm wondering if anybody knows of a function or statement similar to perls read(STDIN, $input, $ENV{'CONTENT_LENGTH'}); to read in a forms content string so that I can manipulate each variable/value pair independently of their values. The reason for this is that I have a complex application form which has many inputs and I would like to put these values through a validation filter without explicitly naming them individually. My other option is to make an array of the variable names and use this in a for loop to go through each variable/value pair. This is fine but it would be handier to let PHP do that for me.
Displaying Text Fields On User Input
How would I echo a particular amount of text fields depending on how many the user selects from a drop down menu that I have already created. For example say the user selects 4 or whatever other number from a drop down menu how would I echo 4 or whatever the amount of text fields for a user to input text into? An example would be an airline website were you select how many people are travelling and then it echo fields for those people to enter their names.
Custom Fields - When User Submits It Goes To Admin's Email Or PM
I would like to create another page on my phpBB that would have customizable fields that users could enter information into and then submit the page. The info would then be sent to the Admin's email or PM. Here's a screenshot to illustrate, this would be a registration for a car show: <snip> Any ideas how to add these custom fields and then submit to an email or PM?
Give User A Choice Of Fields To Search With Full Text/Boolean?
I want to give the user the option of searching a combination of the fields $Topic, $Subtopic, $Theswords in Boolean/Full Text. The problem is if I make any of the fields empty prior to the query, I get a MySql syntax error message. The user has the option of selecting fields via checkboxes, but when the field is not selected the user will get the error message because the variable is empty in the query statemtnt. Are there any code suggestions for avoiding the error message when a field is not selected by the user to be searched? Code:
PHPmyadmin Access Denied For User 'user'@'localhost'
WinMe machine as server, with Apache 2 installed and working PHP4 installed and working ( had PHP 5.05 installed and working, but i couldnt get the mysql extensions to load - phpinfo() didnt list mysql :(, so i installed PHP4, which now lists mysql when i run phpinfo). MYSQL 4.1 installed and working. I dont know the console commands too well, but i know its working ok, cos I have used a few simple DOS prompt commands to check its alive and I can connect to the database using MyODBC frontend/driver 3.51 and also using Navicat 2004. When i try to connect to the database via PHPmyadmin from another network PC I have an error: #1045 - Access denied for user 'user'@'localhost' (using password: YES) I have played around alot with different settings in the config.inc.php file.... nothing seems to work. This almost appears to be a simple login problem ( probably is too), but I can access the database locally from the Winme machine with the username and password that wont work over the network! I have tried not using 'localhost' as the host name but the IP address of the Winme PC but I get this error: #1130 - Host 'MYSERVERNAME' is not allowed to connect to this MySQL server
Notice: Use Of Undefined Constant User - Assumed 'user'
I have a script for a shopsystem on a Linux. There it works fine. But when I try to run it on my Windows machine, PHP says things like Notice: Use of undefined constant dbname - assumed 'dbname' in c:apachehtdocsaposhop estshopclassesxxx.clas s.php on line 77 On Windows I run PHP 4.3.2 On Linux runs PHP 4.3.1
Authenticating User Common User Names
I want to create a password protected page with PHP and Mysql. I have 2 groups User and Admin. The respective groups have a common user/password. The user/password are stored in a database. I want to authenticate the user through a login form and not through a pop-up ($PHP_AUTH_USER) way. What I want is, if a user logs in and he moves from one page to another, he should not be asked for validity again. Is this possible only with scripting (without session and $PHP_AUTH...). If yes - how do I keep track of an authorised user and unauthorised user, so that he should not be validated again. Does setting the user variable to global in all the pages do the trick.?
User Authentication And PHP Saving As Specific User.
the users of my server had to upload their pages by sftp and only the user who uploaded a page was able to edit itafterwards. I've been asked to make a secure way for users to log on through the web and edit their pages online. However, although using .htaccess to authenticate users, the script saves as user 'nobody' and is not able to edit pages previously uploaded (and saved as user 'john_doe'). What I am trying to do is make the script save using the same username as the user used to log on.
Script To Automaticly Fill In Fields On A Website
I have a website that me and my friends need to vote on every day. It has one field, the email field, and one field a image verification that you have to type in. What I would like to do is have a script that looks opens the webpage in a new window, populates the email address from a database, then repeats for each name in the database. That is really all it has to do, I can go and do the image verification myself, it would be nice to have something that can do that too.
Dynamic Fill Form Fields Depending On Dropdown Box
This question has probably already been asked, but let me ask again I have a mysql database to which I connect with my php scripts. The database contains articles. Name, Unit_Price and Reference Now my client needs to order 5 items, click a button and a table with 5 lines and 3 columns appears (until now easy) In the first column is a drop down box with a <select > and <options> in which I store all possible names. I would like than whenever the client changes one of the boxes (in my case there are 5) the Unite_Price column and Reference column in the line he just choose get automatically updated
User Name
i am going through the process of password protecting a directory using ..htaccess and .htpasswd Is there a function to get the user name?
Getting User ID
I have a system where a user can log into the members area. Is there a way for the users to edit their profile WITHOUT using session_id? My database table looks like this: ID, Name, Surname, Address, Email, Username, Password. In other words, when the person logs in, I want the ID to be dragged with it and available on the members index page on the Edit Profile Link, ie. edit_profile.php?id=35.
Web Server User Name
Probably two really stupid questions and I expect they've been asked before. 1. How do I find out what name the server / php is running under? (nobody or whatever) 2. Is there any reason why I shouldn't be able to chown a directory to this user or do I need to be root? I'm asking because I don't seem to be able to chown to nobody.
Get User Information
Hi, how do i get some information about my visitors? Things like IP, Operating System,used browser, referrer url and so....
User Management
I have PHP 4 installed and am wondering what is the best way to handle users. Should I use cookies or the built in session management in PHP 4? Are there any tutorials on any of these?
User Authentication.
I got the following script from the PHP4hosting site, it was done by devshed. I am trying to use it but it doesn't accept any of the usernames or passwords I enter, any ideas why pls? <? function authenticate() { Header( "WWW-authenticate: basic realm='MySQL/PHP Demo'"); Header( "HTTP/1.0 401 Unauthorized"); echo "You must enter a valid login ID and password to access this resource "; exit; } if(!isset($PHP_AUTH_USER) || $PHP_AUTH_USER=="" || $PHP_AUTH_PW=="") { authenticate(); } else { mysql_connect( 'localhost','user','pass'); mysql_select_db("users"); $result = mysql_query("select * FROM users where name = '$PHP_AUTH_USER' and password='$PHP_AUTH_PW'"); $row = mysql_fetch_array($result); if ($PHP_AUTH_PW!=$row["password"] || $PHP_AUTH_USER!=$row["name"]) authenticate(); } echo "User ID :".$row["id"]; ?>
What User Does Php Run As On Win32
I need to know what user php runs as on win2k/iss 5 installed as cgi. Basically what i'm trying to do is modify files on another server with php, and I can't figure out what user needs access to those files/directories so php can get at them.
Apache User Through Php Possible?
As a part of a "system test" page I'm writing, I want to find out what user that apache is running for the virtual host that it is running. Ex: (from apache's conf file) DocumentRoot /home/ron/public_html/ User ron Group ron I want to find out that the virtual server is running as user "ron".
Retrieving NT User ID
Does anyone know how to retrieve the NT user id that someone is logged in as? System is running IIS. Have tried HTTP_AUTHENTICATION but that doesnt appear to work under MS - unless someone knows a works around. Alternatively - how can I retrieve a UNC pathname for a specific drive mapping.
User Registration In A DB
I am creating a web application which involves users registering details in a DB. Obviously this is a very common thing to do and there seem to be many different ways to solve this problem. 1. Is there a way to do this without needing to hard code DB login details into the source? 2. Is it better practice to create individual DB users for new members when they register and use DB authentication, or should the DB connections all be through a single user and use code to check a table containing user name and password hash? 3. Is there a way to create a connection pool in PHP?
User/Pass In URL
Hello all, I am trying get one server to authenticate to another server possibly with a browser window in the middle. My browser throws a syntax error at this url http://username:password@domain.com:2082 but will allow the same with ftp - ftp://username:password@domain.com I want to have a page that has login buttons for remote sites (hosting client sites and the like). I understand that with "AuthType Basic" the server sends a request for login information (403 or something like that). The browser subsequently sends the user/pass on every other request for a page/resource on that site. Is there a way to do this in advance? ie can I do something like this in html ? .. <form action="http://theirdomain.com:2082" method="post"> <input type="hidden" name="user" value="username"> <input type="hidden" name="pass" value="password"> <input type="submit" value="Your cPanel"> If not then can I proxy it on the server? ie can I place the username and password into the headers to the remote site and pass a cookie back to the browser so they can continue the session with the remote site?
User Access
Can anyone help me with user access? I want to have different levels of access for users. For example; when I create accounts for users to og into my websitem, I want to be able to specify the level of access they will have. Let's say user A can access pages 1,2&3 and user B can access pages 3,4&5. I would like to have check boxes that I can check to allow them access to the specified pages!
Redirecting A User
I am looking to create a directory when a user logs in, and have that user redirected to their page logon. I have this script, which I haven;t implemented, but I would like your opinion. <script> // Define the URL for when the user is logged in $url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); // Make sure there is no trailing slash if ((substr($url, -1) == '/') OR (substr($url, -1) == '') ) { $url = substr ($url, 0, -1); // Chop off the slash. } // Redirect to the page at logon $url .= '/' . $_POST['username'] . '.php' </script>
How Do I Set Up User Accounts?
I am building a Lab Information Management system. I am trying to give access to some of the data in my MySQL DB to users. I would like for a user to be able to log in and view any of the data that pertains to his/her projects only. This needs to be pretty secure as we have some external customer information which is sensitive. (but not top secret). The specific question I have is, how do I build such limited access? Do I use the user_id (primary key in the user table) stored as a variable and use session management to move from page to page? How secure is that? Would it be better to use secure cookies? Either way I take it that the user_id is stored as a variable and used in the sql query to restrict the dataset? Is this a secure way of doing things or could some unscrupulous hacker come along and steal my data?
User Authentication
I am using my webhost's username and password system, which generates .htaccess and .htpasswd user verification (Bluehost). I want users to login to the password protected subdirectory (let's say www.example.com/clients/) with the browser's default login dialog box, which is all automated by Apache and the web browser... But once they are logged in, I want the target page (www.example.com/clients/index.php) to read the username that they logged in with and redirect them to a subdirectory with that name (www.example.com/clients/username/). Is there a way for PHP to read the username that they logged in with through Apache? Perhaps some kind of HTTP request that will return the username as a variable?
User Details
building a login system for my website and i need to know how do i get the name of the computer the user is on? i have already figured out how to get the ipaddress but testing that on our network here if i login on one computer all others get logged on automatically so i need to be able to identify the particular computer so as to prevent this.
User Accounts
I'm desigining a website using php/mysql which has user areas for clients to upload information and details into their respective user areas. Each user will have their own directory in the site based on their own database with the exact same tables, fields etc, the only difference is the 'connection.php' will be different for each user as it will connect them to their respective database. I then plan to have a login based on a members table which will redirect user/pass combinations to the relative directory. What i want to know is, is there a way that insteadof having seperate directorys for each user, when they login the respective 'connection.php' can be loaded for the user eliminating the need for directorys for eachj user.
Validate User Name
I need to validate the characters in a user name. what PHP function can i use to check if the user name has only letters, numbers and/or underscores.
Validate User
I have a web page that cost(been worth) the user and password against mysql, which happens is that the users give themselves the login and password and several persons enter with the same information. It(he,she) wanted to do that alone it(he,she) could deposit one simultaneously using the same login ...
User Authentication
I am starting to develop a scientific website, deployed on a Linux-based Apache web server, using PHP and mySQL to display interactive web pages. I would like to create both public and private sections of the website - the private sections policed by some kind of user authentication login system. I was wondering if anyone can recommend a good system for controlling username/password authentication and user sessions in PHP? I understand that there are some freely available scripts out there which can handle this for you and provide administration pages where you can add/remove users etc.
User Online
I need to be able to tell and post it out to a web page when/who is on my website. There is a login screen, a members mysql database, and the rest of the site is php.
Random User ID
I have a site that tracks users via cookies. The user ID is stored in the cookie and I reference it through an SQL database. In the preliminary site, I just had a ID (BIGINT) that counted up from 1. Now the site is ready to launch and I feel that it is a security hole. I only have a couple of hours to change this but I only need to change a couple of things - I just need to know how to: 1. Generate a random number using numbers and letters that is 20 digital long in PHP - I can then take that random number and generate the cookie and enter it into the database. 2. What do I need to have as a feild definition in mySQL - will a VARCHAR(20) work?
Only Allow Authenticated User
how could i make my php pages to be viewed only by authenticated users? note: my index.php has the prompt for authentication. but if i put something like http://www.mydomain.com/otherpages.php - they would be able to get-in without even logging in. How could i avoid this ?
User Management
I am trying to find a GOOD user management script I can learn off of. I have read tutorials and such, but find it easier to learn by looking at complete programs. Is there a user management script that is top notch you would recommend?
New User Form
My host has register globals off and my scripts cannot write to my database. What is the correct syntax to assign my variables the super global and how should it look? Example: include "config.php"; $name = $HTTP_POST_VARS['name']; $email = $HTTP_POST_VARS['email']; $comment = $HTTP_POST_VARS['comment']; how should it read with register globals off? I know I have to use $_POST[]. Would it simply be; $name = $_POST['name'];
User Authentication
Currently I am developing a website using phpBB as a forum for it, but I'd like to use the database information for users and statistics (because i am lazy, and it would be nice to add a calender to the site that registered users could submit dates to). It seems easy to do, but my newness to the php language has proved a problem in making my concept a reality. The problem I am encountering is my with login script. I have an html page with all the forms to log in, and all that good stuff which passes it to the login script i made. This part works properly, but when i go to protect other parts of the site i have made it doesn't work. When I say doesn't work, i guess i should clearify that. I have a file called thing.php (bad name i know, but just for testing purposes), and i included the login file, so i would get directed to the login page if i am not currently logged in. PHP Code:
User Managerment
Anyone know about a usersystem thing that allow people to post Articles and stuff. - I can have more then 1 user on it - When someone post it make a new page for the post - Add a link to the post on another page - No need for MySQL - I can edit the posts - Displays who did post it, when it did got posted - When they type [ code ]codes here[ /code ] it should come in a table with the background color: #CCCCCC and a white border of 1px and the standar color on the tags (like the [ php] and [/ php] thing on this forum. - You use a normal form to do the actions - When you post, if you type: <a href="blah">blah</a> it will be a link, and all html tags allowed Think that was all. I dont think there is a script like that. But if you can find/make something that is almost the same.
User Tracking
Does anyone know how to track user between pages? I've been using session, but it still stay as a user if I click on "back" button. Is there any way to automatically logout the user if the 'back' button clicked or the page freeze for amount of time?
User Functions
I am a bit confused by writing or using my user functions. The only way I know at the moment to call my own functions is to put them in one file with the main program. this example comes from http://de.php.net/manual/de/functions.php <?php function foo($foo, $bar = "bar") { echo $foo.$bar; } echo foo("foo"); //gives: foobar echo foo("foo","bar2"); //gives foobar2 ?> I would prefer one file one function. How could I do this or is this absolutly wrong to do it this way. How did php know where to look for a user function.
Php User-interactivity?
Does user -interactivity exist in php? E.g. I want a php function to be called when a button is clicked; is this possible? If not; can javascript call a php-function? Then I can define a javascript function which calls a php-function, and then call the javascript function when the button is clicked.
User Hierarchy
in developing a user hierarchy for a script that i'm developing. I'm developing an eTimeCard where i only want the ground user to make edit's to his/her card. Therefore i just need an idea of how to implement that superior user idea.
User Authentication
I have put together a quick user authentication script, but am having problems trying to get it to run, the "login.php" script is as follows: PHP Code:
User Profiles...
Iam looking for an script that makes USER profiles so user come to my site fill in a field with some questions like username/ name /age/ day of birth/ where they life and a field for some HTML or UBB code where they make there profiel cool with pictures etc etc These profiles much be searchable on Name Age Where they life and sexe...Also other members (who have an profile) can leave messages on the other profile and can rate there profile... Its for an NON comercial site just for me and my friends.
Identify User Lan
Is it possible to identify the user (i.e. username) in an intranet (local area network) environment using php? I would like to develop an intranet website with user-dependant information with php and MySQL. In a local area network I know its possible. I have used this with OS: windows and ACCESS.
User Input...
I have a form with a field that expects user to input HTML tags. I know I have to use htmlspecialchars for that input but what if the user inputs PHP code? I've looked at the help file and I can only find strip_tags which removes both PHP and HTML tags. If a user wants to crash/corrupt/hack into your site by entering PHP code, what kind of things can he type? Must he include PHP tags to work? If he must use PHP tags, I could just write a function to remove only the PHP tags and not the HTML tags.
|