After looking through the code again I think your query is fine as it is and you just need to move the one line and rewrite it to pull the data from $LoginRS like I said.
It seems to just be a simpla matter of moving the one line and getting the table information. You might also need to add another line similar to this but I'm not sure if it's needed or not.
$newArray = mysql_fetch_arr ay($LoginRS);
Then...
User Profile
Collapse
Profile Sidebar
Collapse
Vagabond
Last Activity: Jul 13 '06, 05:09 PM
Joined: Apr 24 '06
Location:
-
Last edited by Vagabond; May 24 '06, 07:39 AM. -
I'm not real good at SQL yet but it would seem to me that you MIGHT (Not sure) need to change this line below to add in the user directory to your query. However I think you are still getting the whole table and putting it into $LoginRS
...Code:$LoginRS__query=sprintf("SELECT user, pass FROM authentication WHERE user='%s' AND pass='%s'", get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc()Leave a comment:
-
Are the users filling out a form with the $_POST['redirect'] code ?
I don't see this part being pulled from a database. You are trying to pull it from a form. If it's not being filled out in a form then that would be why the redirect information is missing or mispelled on the form perhaps.
[PHP]mysql_select_db ($database_lp_d atabase, $lp_database);[/PHP]
I also don't see where $database_lp_da tabase is defined...Leave a comment:
-
PHP Dazed and confused!
ok I have been potring a CGI script to PHP but have run into a small problem. I can't seem to get the script to find my data file even though I used the same code just fine in other scripts.
[PHP]function counter(){
############### ############### ############### ############### #
# Set program parameters here #
############### ############### ############### ############### #...Last edited by Vagabond; May 18 '06, 07:58 PM. -
I'm learning PHP myself but I think I see the problem. I believe this line is wrong.
[PHP]$MM_redirectLog inSuccess = "/" & $_POST['redirect'] & "/index.html";[/PHP]
Try changing it to this:
[PHP]$MM_redirectLog inSuccess = "/".$_POST['redirect']."/index.html";[/PHP]
or try this:
[PHP]$MM_redirectLog inSuccess = "../"...Last edited by Vagabond; May 18 '06, 05:35 PM.Leave a comment:
-
Looks like you missed one also. I want and looked over the foreach statement and had to change that also to this before it would work properly:
...Code:foreach($ignoreme as $value){ echo $value."<br>"; }Leave a comment:
-
trying to port a CGI script to PHP
I'm trying to port an old CGI script to PHP but am having some problems in one area.
This is just a snipit from the script that shows users online and counts the number of hits on the web page. I can't seem to get...Code:# List of IP addresses to ignore, add your own IP to the list $ignoreme = array("127.0.0.1, 127.0.0.2"); foreach($ignoreme){ echo "ignored"; }Last edited by Vagabond; May 16 '06, 05:05 PM. -
NM I don't think what I had in mind would have worked after looking it over. lol. Sorry I am still learning php and SQL myself.Last edited by Vagabond; May 16 '06, 04:26 AM.Leave a comment:
-
Banfa is right though. It's not an error your seeing and there are no files listed for the directory. Are you sure you put the files into the correct folder ?Leave a comment:
-
Have you told Apachee in your config that you are using PHP like this?
# For PHP 4 do something like this:
LoadModule php4_module "c:/php/php4apache2.dll "
AddType application/x-httpd-php .php .phtml .html
# configure the path to php.ini
PHPIniDir "C:/php"Leave a comment:
-
Here is a direct link to the book I was talking about.
http://www.samspublishing.com/title/0672327252
There is also a rd eddition of the book out now at:
http://www.samspublishing.com/title/0672328739...Leave a comment:
-
I also got the resource ID problem figured out. Guess I didn't need help afterall. Just needed a break from coding. lolLeave a comment:
-
I found the error here
$a = $_Post[selectuser];
Should be:
$a = $_POST[selectuser];
It's still not quite working the way I wanted it to because it returns the resource ID instead of a user name but I will try to play with it more and see if I can figure that one out.Leave a comment:
-
If your just looking to learn how to make such a program I would highly recomend getting the book PHP, MySQL and Apache ISBN 0-672-32725-2 from www.samspublishing.com
It's a good book to learn PHP/MySQL and has an almost finished script for what you are describing. The only problem with the book I have seen is the programs they give you don't work without a recompile of PHP to incorperate support for MySQL. But you might not need...Leave a comment:
-
PHP help needed.
I have a section of code that seems to work untill I go to get the result but can't see what I am doing wrong.
...Code:function Edit_User(){ global $conn; Connect_to_db(); $sql = "SELECT * FROM user"; $result = mysql_query($sql, $conn) or die(mysql_error()); ?> <form method="post" action="../news/news.php?page=Edit_Selected_User" name="EditUser"> -
Thx again for the help. That was what I was looking for and how I thought it should work. I must have done something wrong before because I would get a page not found error before but I do have it working now with your help and I can stop using session information for that stuff.Last edited by Vagabond; Apr 24 '06, 12:44 PM.Leave a comment:
-
Need help with PHP.
I am trying to write a PHP script for tracking information and storing it in text files. The program has gotten to the point that I now need several php pages for the program to work however I can't find information on passing information from one PHP page to another. I know how to read the $_ENV with CGI to pass the information but am trying to learn PHP over CGI.
Is there a way to read the URL information for something like this...Last edited by Vagabond; Apr 24 '06, 03:59 AM.
No activity results to display
Show More
Leave a comment: