[PHP] sessions problems

2005-04-29 Thread Anasta
Anyone know how to update a record on logout, heres what i am using for
login, however there iare no variables for the logout page.

?
session_start();  // Start Session

include("connect.php");

$username = $_POST['username'];
$password = $_POST['password'];

   // Register some session variables
   session_register('username');
   $_SESSION['username'] = $username;
 //sets user online to yes
$sql = mysql_query("UPDATE users SET online='1' WHERE username='$username'
AND password='$password'");

   if (($username == "admin") And ($password == "admin")) {
header("location: login_admin.php");
   } else {
header("location: login_success.php");
   }

?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] users online

2005-05-01 Thread Anasta
Hi, is this possible--
I need a user (already logged in) to click on a button and his username
shown in a text box next to it.
 This is for a chat and they need to be seated similar to poker game where
they sit-in/sit out.

Any help apreciated !

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Submit name change

2005-05-01 Thread Anasta
I need this to change the value of the button 'sit in'  to the name of a
user --it doesnt work so anyone got any ideas or is what i am looking to do
impossible.
Either the button name can show the username or a text field can change from
blank to show the username when clicked.



   




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] if then else

2005-05-04 Thread Anasta
Can anyone help with a statement, ive tried but it never works.
I need to show a value if it is set to a specific value  ie:

At the moment If a user is logs in a record is updated from 'away' to
'online'---so i want an echo statement to show a value from another table if
they are set to online or else they show another value.
(2 seperate tables).

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] select statement

2005-05-05 Thread Anasta
Why doesnt this work, it shows the username but not the balance of the users
money.here is the mysql table:

CREATE TABLE `users` (
  `user_id` int(11) NOT NULL auto_increment,
  `username` varchar(15) NOT NULL default '',
  `password` varchar(15) NOT NULL default '',
  `status` varchar(10) NOT NULL default '',
  `user_balance` bigint(5) NOT NULL default '0',
  PRIMARY KEY  (`user_id`)
) TYPE=MyISAM AUTO_INCREMENT=3 ;





/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] form variables

2005-05-05 Thread Anasta
Can anyone tell me how a submit button can be used to send set a variable so
there is only a button --no textfield.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] if then else statement not working

2005-05-05 Thread Anasta
What am i doing wrong here, the output is always 'empty'






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] newsgroup

2005-05-06 Thread Anasta
Anyone know a good mysql newsgroup to compliment thid php newsgroup




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Is there a mysql newsgroup like this php.general ANYONE?

2006-03-27 Thread Anasta
I need help with an insert using joins.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Need help with modifying values

2005-12-18 Thread Anasta
The first script works ' modify_values.php' showing the values and a modify 
link next to each but the next script it parses to  'modify_values2.php' is 
obviously not working. I have tried to modify it from another script and 
cant get it to pass the correct variables-- it always shows the first row in 
the database . Any help appreciated.

+++
modify_values.php










 Title
 Rating
 


" . $myrow['Name'] . "";
 echo "" . $myrow['Rating'] . "";
 echo " Modify";
}
?>


+++



modify_values2.php

++







  
Title
 

  
  
Rating
 

  
  
  
++
   


 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] insert to DB

2005-12-18 Thread Anasta
It just wont insert new data into DB--any ideas as i have gone over and 
over.



 Edit";


}
}
?>


  
  ">

  Name: " SIZE=15 maxlength="15">
  Rating: " SIZE=3 maxlength="3">
  
  
  




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ID--how to keep them in order

2005-12-19 Thread Anasta
I have a script which outputs a movie title, rating and the ID number 
(below).
The ID number is also used in the admin section as a select for update and 
delete.

The problem i have is that as i delete certain entries then the number 
sequence on the display page has missing numbers--is there a way to move all 
rows down to the next number in the mysql DB so the ID remains there.
The easiest way is to not display the ID in the first place i am guessing, 
but it would be good to know if there is another way.



There are 16 DVDs titles.
  2 Monster in Law PG
  3 Pulp Fiction MA
  4 Bambi G
  5 Shrek PG
  6 Madagascar G
  7 Grease II PG
  8 Star Wars M
  9 Harry Potter-Askaban PG
  10 Lilo & Stitch G
  11 Garfield G
  13 Saw I MA
  14 Saw II MA
  15 Longest Yard R
  16 Robots PG
  17 Bewitched PG
  20 Team America PG

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] select statement with variables ???

2005-12-20 Thread Anasta
Can someone tell me why this select is wrong please---ive tried everything.
the $cat is the tablename .


$query=" SELECT title FROM $cat WHERE id='$id'";



full script below





Edit and Submit changes

">
Title:
">







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php