[PHP] Re: Session Tutorial
[EMAIL PROTECTED] wrote: > Recently I have been trying to work with sessions however I must admit that > I am not sure I completely understand them. Does anyone know of a good > tutorial that thoroughly explains sessions? > Thanks in advance I can write one if you want, send me a mail. Greetings, René -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: I would like to get a script to display in a frame
[EMAIL PROTECTED] wrote: > Does anyone have any experience with making script output display in a > frame?? I would like to get this to happen on an e-commerce site I am > designing and am stuck. I have tried action=myscript.php target=main> with no success. Please help. > > Jeff Means > CIO for PicoTech > http://www.picotech.net Hi Jeff, maybe it's a good idea to create a hidden HTML-form in the output frame. In that case you can use javascript in your input frame in order to send the given values to the hidden form in your output frame. After that you can submit the hidden form using the same javascript in your input form. For example your output frame is called "output" To fill your hidden frame with input data: output.document.forms[0].hidden_name.value="value"; I would simply create a hidden submit-button (using css display-function) You can activate this button out of javascript with: output.document.forms[0].submit.click(); It's very simple, but I think it should work. Greetings, René -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: creating table help
[EMAIL PROTECTED] wrote: > I'm very new to php and PostgreSQL. I keep getting the following error > when I try to create a table: > Warning: Wrong parameter count for pg_exec() in > /var/www/html/elkan/createtable.php on line 23 > The table, ghdsl could not be created > Here is the code I'm using: > // set variables > $tablename = "ghdsl"; > $dbname = "testingdb"; > $user = "testinguser"; > $password = "xx"; > $connect = "pg_connect($dbname, $user, $password)"; > $query = "CREATE table $tablename (id INT UNSIGNED NOT NULL > AUTO_INCREMENT PRIMARY KEY, ip TEXT, customer TEXT, dslphone TEXT, date > TEXT, vpivci TEXT)"; > if (pg_exec($dbname, $query, $connect)) > { > print ("The table, $tablename was successfully created"); > } else { > print ("The table, $tablename could not be created"); > } > ?> > thanks for any help. Hi there, the function pg_exec only takes two strings withing his brackets. 1. Integer connection index (returned by pg_connect() ) 2. Query string Try changing your code to: if (pg_exec($connect, $query)) Greetings, René -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: transfering a file from one host to another
Yes there is, you can use fopen() with ftp username and password like this: fopen("ftp://username:[EMAIL PROTECTED]/path/to/yourfile";, "w"); Using this you also can open files on a HTTP server with Basic Authentication, code will be then: fopen("http://username:[EMAIL PROTECTED]/path/to/yourfile";, "w"); Yours, René Visser [EMAIL PROTECTED] wrote: > Is there a way to create a file to a remote host. > IE: I have a php script on www.somedomain.com for example - and I want to > fill out a form on this php script and make it create a file called > "index.html" on say www.someotherdomain.com for example. > I have admin and root access to BOTH domains. > Is there a way I can popen or fopen a file using ftp username and password? > The end result - I want to create index pages on the fly by filling out a > form - which will in return create the page for my other web sites. > So far, I have successfully created the index page. But to get it to the > other site I am manually downloading the index page to my local computer, > and uploading it to its new site - Not the most effective way to do things. > Any ideas??? > Thanks in advance > Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php