| 
	
 | 
 Posted by Janwillem Borleffs on 06/18/11 11:35 
zek2005 wrote: 
> I have two errors 
> (http://www.historiadelpais.com.ar/bp/acciones_vigentes.php). 
> 
> First: As I do not have the second variable when I load the page I 
> receive the first error. 
> Second: When I enter a branch (example: 17 or 20), the combo box works 
> but when I try to retrieve the customers I have another error. 
> 
 
Sounds like a classical register_globals problem. Look it up in your php.ini  
file; when it's omitted or disabled, $PHP_SELF won't work, and you should  
use $_SERVER['PHP_SELF'] instead. This also applies to form variables,  
which, in your case, will be stored in the $_POST array. 
 
>         $dbase = mysql_connect("localhost", user , pass); 
>         mysql_select_db(historia,$dbase); 
> 
 
Already addressed by others in the thread. The reason that the bareword  
'historia' works is that PHP's kind enough to create a variable on the fly  
with the name as its value. Be aware, however, that this isn't good practise  
and raises a notice on systems with the default error_reporting level. 
 
JW
 
  
Navigation:
[Reply to this message] 
 |