[PHP-DB] PHP and ORACLE conection error

2003-01-28 Thread xxx xxxx
hy,
i'm having a problem with my project
i have an oracle server on a computer named oracle and in apache htdocs files i have a 
directory special for my project...

1 in that dir i have a html file named index.html
here i get the username and the password and post it to the validate.php file

in the validate.php file:
the first i have is 
?php session_start(); 
 header(Cache-control:private); ?
then

1. i get the variables
 $name=$_POST['username'];
 $password=$_POST['pass'];

2. i register the variables 
  session_register(name) and session_register(password),

3. i verify if they can acces to the database 
if( ociplogon($name,$password))
 $ok='true';
else $ok='false';

4. in the body of the validate.php i have a script in order to load a new page

script
var ok=?php echo $ok; ?
if(ok==true) 
 window.location.href=good_page.php;
else
window.location.href=error.php
window.reload();
/script


well
that's it
it works but not finei know it isn't the best way but it worked 
till some days i have any problems but since today i don't know what is happening...

sometimes it works loading the good_page but sometimes it loads the error page
i think it is something with authentification and session but i need a solution 
quickly...i have no time to rethink all...

if you have a solution or another type of making all i have made send me a reply
thanks a lot...
cybercop78

http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


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




Re: [PHP-DB] converting from form - dropdown box

2003-01-14 Thread xxx xxxx
hi,

all
you have to do is to extract values from the database with a query.
i suppose you know...
after that you have to do all you have done till now except the dropdown toolbox(that 
is called actually a listbox).
for the list box you have to write like this:
select name=select
?php for($i=count(records returned by the query);$i++)
echo 'option name='.$records_returned[$i].'$records_returned[$i]./option';
?
/select

so the select it's here your input type text..and the other are the same like you have 
on that form.

if you want an example on how to extract values from a database try to search on 
php.net because now i don't know what database you use and so on...

cybercop78

On Mon, 13 Jan 2003 16:20:27 -0500, Dzung Nguyen wrote
 Anybody could hep me converting the following form to dropdown box?  
 The easier task (I assume) is to populate the box with the all 
 possible values of a column in mySQL table (I don't know what how to 
 do this yet, though).  I also haven't been able to find the 
 dropbox's equivalent of form's input lines that are hidden (e.g. 
 input type=hidden name=\select\ value=\$tempselect\).  Thank 
 you, I really appreciate your help.
 
 $temphost = $host;
 $tempselect = $select;
 if ($select == all) {
 echo font size=$fontsize-1Choose hostbr/font
 form action=\build_form.php\ target=\_top\ method=get
 input type=hidden name=\select\ value=\$tempselect\
 input type=hidden name=\order\ value=\$order\
 input type=hidden name=\ordertwo\ value=\$ordertwo\
 input type=hidden name=\way\ value=\$way\
 input type=hidden name=\waytwo\ value=\$waytwo\
 input type=hidden name=\date\ value=\$date\
 input type=hidden name=\target\ value=\$target\
 input type=hidden name=\input\ value=\$input\
 input type=hidden name=\output\ value=\$output\
 input type=hidden name=\test\ value=\$test\
 input type=hidden name=\result\ value=\$result\
 input type=\text\ name=\host\ value=\$temphost\ 
 size=17 maxlength=10/form ; echo /table ; }
 
 -- 
 Dzung V. Nguyen email: [EMAIL PROTECTED]
 Alpha Linux Group   http://linux.iol.unh.edu/clp
 InterOperability Laboratory
 University of New Hampshire phone: (603) - 862 - 0401
 Durham, NH 03824fax  : (603) - 862 - 4181
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


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




Re: [PHP-DB] browsing sorted resultsets from an oracle db

2003-01-14 Thread xxx xxxx
try steping like this:
1. select all you have to find; like dates[][] ..the result is a matrix if you have 
more then one field
2. register that values with session_register(dates)
3. in every page you have to put a starting counter with it you have to display the 
values starting with... like show_results.php?start=100 
and the next show_results.php?start=110
4. in show_results.php you have to extract the parameter with GET 
..$start_counter=$_GET['start'];
and global $dates; display the $dates[$start_counter=$i]...

cybercop78

On Mon, 13 Jan 2003 16:57:42 +0100, Markus Mirsberger wrote
 Hi,
 
 I got the following ( simple :) ) problem. I have like 1 million 
 keys and I want to browse through them likeshow next 10 or 
 show last 10 or show next or show last for example. this is 
 pretty easy in mysql but for some reason not in oracle:) The first 
 solution I had is to have a subselect where I select all data, 
 number it and select the data I want to show from this subselect. 
 But every single site takes ages to load and its not very 
 intelligent to get all data first, number it and then just select 
 like 100 rows from that subselect :) I think many people have/had 
 this problem but I didnt find anything while searching the web.
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


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




Re: [PHP-DB] Oracle and CLOBs

2003-01-14 Thread xxx xxxx
try

SELECT Title, NewsDate, Content FROM inf_news WHERE ID_News = 5
Where Title is VarChar, NewsDate is Date and Content is CLOB


! not Content is a CLOB ! - simple is CLOB because i guess it interprets you 
say is a not is a CLOB..it thinks the datatype you are searching is a

cybercop78



On Mon, 13 Jan 2003 19:35:04 -0600, Jadiel Flores wrote
 Hi, I'm having a big problem with php and Oracle.
 
 I'm using Oracle 8.1.6 and PHP 4.2 with the Oracle component in a 
 Solaris server, I can not recompile apache and php to install the 
 oci8 component and I'm having lot of problems with CLOBs, I'm 
 receiving this error:
 
 Warning: Ora_Exec failed (ORA-00932: inconsistent datatypes -- while
 processing OCI function OEXEC/OEXN) in
 /var/www/espejo/includes/con.php on line 107
 
 Line 107 contains this code:
 Ora_Exec($this-cursor);
 
 The query is:
 SELECT Title, NewsDate, Content FROM inf_news WHERE ID_News = 5
 Where Title is VarChar, NewsDate is Date and Content is a CLOB
 
 It works fine if the query doesn't contain a CLOB.
 
 Any suggestion???
 
 Jadiel Flores
 -
 http://www.abargon.com
 [EMAIL PROTECTED]
 (52-55) 52-29-80-34
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


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




[PHP-DB] sorting matrix

2003-01-13 Thread xxx xxxx
Hy,
I have a matrix with strings ex. 4 cols and many rows
how could I sort the matrix after the 2nd field with maintaining the indexes order

Like in a table

name surname age address..
i have many records and i'd like to print the records in age order ascendent or after 
the surname order...

it's not a result from a query..just a simple matrix with strings and numbers...
i've tried asort function like: asort($matrix[1],SORT_STRING) but it doesn't work...
thanks a lot...

cybercop78

PS :if there are friends from romania and know well programming in php please send 
me a reply in order to combine our powers or to make useful things or 
projectsi'm not a newbie  and i don't want to colaborate with newbies...thanks


http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


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




RE: [PHP-DB] php variables to JS

2003-01-06 Thread xxx xxxx
Forget hidden form

all you have to do is to insert in javascript code php code like this:
?php 
$variable1=1234;
$variable2=87;
?
.
script
...
weight=?php echo $variable1; ?
height=?php echo $variable2; ?

..and so on
/script
it's simple no???

i hope it's good for your needs
cybercop78



On Sun, 5 Jan 2003 08:36:20 -0600, Bryan McLemore wrote
 Could always pass it through a hidden form.
 
 Bryan
 
 -Original Message-
 From: Bruce Levick [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, January 05, 2003 1:09 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] php variables to JS
 
 Bruce Levick - VivamotionI am opening a chromless window with some JS
 code.
 I need to pass some variables which come from rows in my database 
 into the jscript which will determine the size and URL of the window.
 
 Before I go about drawing the info from the database I have set up some
 hard
 code php variables just so i could test how to pass these into js.
 
 Does anybody know how I can code these variables into my jscript??
 
 Cheers
 
 ##
 ?php
 $h = 600;
 $w = 343;
 $theURL = test.php;
 $wname = test;
 ?
 ###
 
 ##
 script language=javaScript type=text/javascript
 SRC=js/java.js/SCRIPT
 
 script
 !--
 function openIT() {
 theURL=wesley.php//php variable here
 wname =CHROMELESSWIN  //php variable here
 W=300;  //php variable here
 H=100;  //php variable here
 windowCERRARa = images/close_a.gif
 windowCERRARd = images/close_d.gif
 windowCERRARo = images/close_o.gif
 windowNONEgrf = images/none.gif
 windowCLOCK = images/clock.gif
 windowREALtit = nbsp;? Task title
 windowTIT = font face=verdana size=1nbsp;your chromless/font
 windowBORDERCOLOR = #00
 windowBORDERCOLORsel = #00
 windowTITBGCOLOR = #FF0033
 windowTITBGCOLORsel = #FF0033
 openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd,
 windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit ,
 windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR,
 windowTITBGCOLORsel)
 }
 //--
 /script
 ##
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


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




Re: [PHP-DB] Passing selection to next page

2002-12-19 Thread xxx xxxx
Hi,
you have to put this list in a form...
form name=select_name action=eval.php method=post
select
option
/select
/form

in eval.php you may write like:
$variable1=$_POST['select_name'];
//and variable1 is now the option_value selected

echo $variable1;

where option_value is the value written in the list...generated by php
if I have a list with 4 values like:
option value=onevalue number one-first/option
option value=twovalue number two -second/option
option value=threevalue number three -third/option
option value=fourvalue number four fourth/option

here the option_value is one or two or three or four

so variable1 is now passed from one page to another..

if you have any questions or you are of a different opinion write to me again

cybercop78


On Thu, 19 Dec 2002 11:04:34 -, Alex Francis wrote
 I have a drop down list created using the following code and am 
 having trouble passing my selection to the next page. Can anyone help?
 
 ?
 $query = select distinct department from courses order by department;
 $result = mysql_query($query);
 
 echo SELECT ID='Category Combo Box' NAME='department';
 echo OPTION VALUE=' ' SELECTEDSelect Department/OPTION;
 
 While ($row = mysql_fetch_assoc($result))
 {
echo OPTION VALUE=';
echo stripslashes($row[department]);
echo ' ;
echo stripslashes($row[department]);
echo /OPTION;
 }
 
 echo /SELECT;
 mysql_free_result($result);
 ?
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


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




[PHP-DB] session ID

2002-12-17 Thread xxx xxxx

Hi,
i'm having a problem with session Id.
I want to pass it through the pages of my site but I use a menu, a javascript menu 
with links...
i have a main page with authentification..
i register variables like name and password...but on the page linked by the menu there 
is started another session with session_start()
The code for each page looks like these:

1. main page
a form (POST)with textfiedls for name and pass

2. the val.php page
?php session_start(); ?
?php $name_req=$_POST['namefield'];
...
session_register(name);
session_register(pass);
$name=$name_req;
$pass=$_POST['passwordfield'];

//if I print the variables now ...they are correct...
then load a link to another page... index1.php

3.index1.php
?php session_start(); ?
and others...
contains the menuin javascript( another page menu.js ) with links like page2.php 
or page2.html

4. page2.php
?php session_start(); ?
and when I print the variables registered
nothing

-

what can I do?
thanks in advanced...

http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


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




Re: [PHP-DB] Oracle/PHP question...

2002-12-17 Thread xxx xxxx
Hy,
in php.ini you have to uncomment the 
;extension=php_oci8.dll
;extension=php_oracle.dll

; is a comment

cybercop78




On Tue, 17 Dec 2002 08:29:36 -0500, Anthony Carlos wrote
 Yes, you need to recompile PHP: ./configure --with-oci8=[your_oracle_home]
 
 -Original Message-
 From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 16, 2002 1:58 PM
 To: '[EMAIL PROTECTED]'
 Subject: [PHP-DB] Oracle/PHP question...
 
 I am now trying to setup connectivity to a remote Oracle database
 for my PHP/Apache web server.  I am attempting to verify 
 connectivity to the database by:
 
 ?php
 $connection = OCILogon(user, password) or die (Unable to logon 
 to database.); ?
 
 I have installed the Oracle client on the system, and I have also
 setup the ORACLE_HOME and ORACLE_SID environment variables.  Unfortunately
 at this point I am not even able to make a successful connection to the
 Oracle database.  I am currently receiving the following error:
 
 Fatal error: Call to undefined function: ocilogon() in /www/DW/oratest.php
 on line 10
 
 Do I need to recompile PHP to be Oracle aware or something?  
 What is it I am missing at this point?  Thanks in advance. Scott 
 Nipp Phone:  (214) 858-1289 E-mail:  [EMAIL PROTECTED] Web:  http:\\ldsa.sbcld.sbc.com
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


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




Re: [PHP-DB] Oracle/PHP question...

2002-12-17 Thread xxx xxxx
Hy,
in php.ini you have to uncomment the 
;extension=php_oci8.dll
;extension=php_oracle.dll

; is a comment

and restart the server
cybercop78




On Tue, 17 Dec 2002 08:29:36 -0500, Anthony Carlos wrote
 Yes, you need to recompile PHP: ./configure --with-oci8=[your_oracle_home]
 
 -Original Message-
 From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 16, 2002 1:58 PM
 To: '[EMAIL PROTECTED]'
 Subject: [PHP-DB] Oracle/PHP question...
 
 I am now trying to setup connectivity to a remote Oracle database
 for my PHP/Apache web server.  I am attempting to verify 
 connectivity to the database by:
 
 ?php
 $connection = OCILogon(user, password) or die (Unable to logon 
 to database.); ?
 
 I have installed the Oracle client on the system, and I have also
 setup the ORACLE_HOME and ORACLE_SID environment variables.  Unfortunately
 at this point I am not even able to make a successful connection to the
 Oracle database.  I am currently receiving the following error:
 
 Fatal error: Call to undefined function: ocilogon() in /www/DW/oratest.php
 on line 10
 
 Do I need to recompile PHP to be Oracle aware or something?  
 What is it I am missing at this point?  Thanks in advance. Scott 
 Nipp Phone:  (214) 858-1289 E-mail:  [EMAIL PROTECTED] Web:  http:\\ldsa.sbcld.sbc.com
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


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