Re: [PHP-DB] short text strings with apostrophes and forms
Jeffry, I suggest use htmlentities/html_entity_decode functions. For example to update the db with values use: $myCol = htmlentities($mycol_value); Ej: query $query = update my_table set myCol='{$myCol}' where id = 'id_val'; Now when your application restore the data from the db you can use: $mycol_value = html_entity_decode ($myCol); $mycol_value: is the value from html form $myCol: is the name of your colum's table to update in your query. Good luck, Regards, Luis Morales On Thu, 2006-04-20 at 17:56 +0200, Jeffrey wrote: I have an application which calls up some data from a MySQL table and puts it into a web form for users to modify. One of the cells holds a text string which is put into a text input field. However, if that text string includes an apostrophe, all text after the apostrophe disappears. For example, if the test string from a database cell reads... Fix the managers' cars by Tuesday and that is saved in the variable $some_text, which is called up in a form... input type='text' name='some_variable' value='$some_text' The text field on the web page will only contain... Fix the managers How can I get the text field to show the entire string? Many thanks, Jeffrey -- - Luis Morales Consultor de Tecnologia Cel: +(58)416-4242091 - Empieza por hacer lo necesario, luego lo que es posible... y de pronto estarás haciendo lo imposible - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Retricting Access to Menu Items
Miguel, Take this tips: Before load your html main tags put: . ? session_start(); $person = array (); $person['firstname']=Jhon; $person['lastname']=Doe; $_SESSION['person'] = $person; ? html /html . Then try get the person array from another php page, using the same schema for that. Regards, Luis Morales On Mon, 2006-03-06 at 21:32 -0800, MIGUEL ANTONIO GUIRAO AGUILAR wrote: Now that you mention it!! I tried to use sessions but without success, i did: session_start(); session_register(var); but after log in as a different user, it keeps taking the data of the previous user. If I close the browser window and reload the page and log in, then it takes de current user Maybe I'm not killing the previous session! session_unset(); Do I need to propagate the Session ID on every page that use session_start()?? Can I use session_id();? Best Regards, Miguel Guirao - Mensaje original - De: Jeffrey [EMAIL PROTECTED] Fecha: Lunes, Marzo 6, 2006 7:37 ombr Asunto: Re: [PHP-DB] Retricting Access to Menu Items I've done this kind of thing with a number of web apps. What I usually do is create a user table in MySQL with a user-name, password and access level, which has an integer value. When a user logs in successfully, a session is created (see session_start() in php documentation), the access level is pulled from the user table and saved as a session variable. Then it is a simple matter of using bits of code like... if ($_SESSION['access_level'] 7){ echo some stuff; } In your example, you will also want to check the user's access level on each restricted page - it is not enough to hide menu options. Users could simply type the URL in. I hope that's clear. Good luck, Jeffrey Jeff Broomall wrote: Good morning everyone. I'm building a very simple content management site that tracks tasks. The options available are: 1. Add Task 2. Edit Task 3. View Task 4. Print Task I need to restrict some users to only View and Print and I'm trying to find a way to tell the page not to load the menu options (the text) for those not having access to the Add and Edit functions. IOW, they would only see View and Print. I have three basic users: 1. System Admin 2. Subject Matter Expert (SME) 3. Viewers Obviously the System Admin and SME will have full access so it's the Viewers that are to have access to only View and Print. I have a users table but haven't set it up for the distinction. What I was thinking was creating a field labeled users_group and assign a numeric value for each user using the numbering system above. I have my page load the menu options: Homebr / View Tasksbr / Edit Taskbr / Add Taskbr / into here... BODY table width=90% border=1 cellspacing=10 cellpadding=0 align=center trtd colspan=2h1 id=mainheadICAO Tasks #8212; WAFS/h1/td/tr tr td align= center valign=top nowrap=nowrap width=10% Menubr / ?php include ('./includes/menu.html'); ? --The menu above inserted here. /td td valign=top class=content How can I tell the system not to load the last two lines unless they are a System Admin or SME? I read a chapter on Cookies/Sessions...but it wasn't that helpful for this case. Can I setcookie('user_group', '3') and use that somehow??? Am I in the ballpark with this solution? Thanks. Jeff -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos. This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee
Re: [PHP-DB] PHP, MySQL and Apache
Hi kinfe, To connect to myql from php you only need build your php with mysql support. Now, for render vxml documents you are using apache o IIS ? I recommend LAMP (Linux+Apache+Myql+Php) Regards, Luis Morales On Mon, 2006-02-27 at 16:07 +0100, Kinfe Tadesse wrote: Hi all, I intend to create a database to be accessed from a voice application. I plan to use MySQL as a database engine and PHP as a scripting language to generate dynamic VoiceXML documents. However, I have two questions I could not get answers to: 1. Do I need to install Apache to work with MySQL and PHP? In other words, can MySQL and PHP work together without Apache. Note: The database and the application are on the same machine for the timebeing. 2. What database API should be used? I recently read about MyODBC. But many standard books skip this part as if PHP and MySQL have something natural to talk to eachother without requiring anything like ODBC, etc. Your answers to these questions are highly appreciated! Best regards, Kinfe T. -- - Luis Morales Consultor de Tecnologia Cel: +(58)416-4242091 - Empieza por hacer lo necesario, luego lo que es posible... y de pronto estarás haciendo lo imposible - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Tracking Site Version
Yes!! Subversion it's the best... On Thu, 2006-02-23 at 13:05 -0800, Micah Stevens wrote: Subversion: http://subversion.tigris.org On Thursday 23 February 2006 12:44 pm, Alex Major wrote: Hi there, I'm currently working on my website which is now live, and was wondering how some of you more experienced web developers record site developments if you do. I'm thinking of perhaps creating a page on the site where I record the site version, and changes made during the update. Just wondering if any of you had a similar system, or if you had any suggestions for recording site changes etc.. Many thanks, Alex. -- - Luis Morales Consultor de Tecnologia Cel: +(58)416-4242091 - Empieza por hacer lo necesario, luego lo que es posible... y de pronto estarás haciendo lo imposible - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Generate Report
ok, Let's go here..! --- generate_report.php -- ? // this script only build query switch ($_REQUEST['submit']){ case Generate: // first extract group $query = ; if(count($_REQUEST['sel_group']) 0){ $wval = array (); foreach($_REQUEST['sel_group'] as $k = $v){ $wval[] = groups_id='{$v}'; } //extract the columns $scols = array (); if(count($_REQUEST['sel_cols]') 0){ foreach($_REQUEST['sel_group'] as $k = $v){ $scols[] = {$v}; } //building query $where = join(' AND ', $wval); $sel_cols = join(',', $scols); $query = SELECT {$sel_cols} FROM tasks WHERE {$where}; } } //if $query is empty you can catch this case as an error because there is not any group or selected columns break; default: //reset your form unset($_REQUEST); } ? fieldsetlegendGenerate Report/legend form action=generate_report.php method=post CENTER TABLE BORDER=1 cellpadding=5 cellspacing=5 TR TD rowspan=2 valign=bottomstrongSelect Group(s)/strong/TD TD colspan=2strongSelect Columns/strong/TD /TR TR TDstrongCategory One/strong/TD TDstrongCategory Two/strong/TD /TR TR TD align=left valign=top input name=sel_group[] type=checkbox value=1Group ABR input name=sel_group[] type=checkbox value=2Group BBR input name=sel_group[] type=checkbox value=3Group CBR input name=sel_group[] type=checkbox value=4Group DBR /TD TD align=left input name=sel_cols[] type=checkbox value=Column AColumn ABR input name=sel_cols[] type=checkbox value=Column BColumn BBR input name=sel_cols[] type=checkbox value=Column CColumn CBR input name=sel_cols[] type=checkbox value=Column DColumn DBR input name=sel_cols[] type=checkbox value=Column EColumn EBR input name=sel_cols[] type=checkbox value=Column FColumn FBR /TD TD align=left input name=sel_cols[] type=checkbox value=Column GColumn GBR input name=sel_cols[] type=checkbox value=Column HColumn HBR input name=sel_cols[] type=checkbox value=Column IColumn IBR input name=sel_cols[] type=checkbox value=Column JColumn JBR input name=sel_cols[] type=checkbox value=Column KColumn KBR input name=sel_cols[] type=checkbox value=Column LColumn LBR /TD /TR /TABLE /CENTER input name=submit type=submit value=Generate /form /fieldset -- end generate_report.php -- Good Luck Buddy!! Regards, Luis Morales On Tue, 2006-02-21 at 23:06 -0500, Jeff Broomall wrote: I thank those who promptly responded to my first inquiry on the list. This second request is, I assume, a tad more challanging. I need a Generate Report function that'll allow the user to select one or more groups and what columns he would like to view. For instance, fieldsetlegendGenerate Report/legend form action=generate_report.php method=post CENTER TABLE BORDER=1 cellpadding=5 cellspacing=5 TR TD rowspan=2 valign=bottomstrongSelect Group(s)/strong/TD TD colspan=2strongSelect Columns/strong/TD /TR TR TDstrongCategory One/strong/TD TDstrongCategory Two/strong/TD /TR TR TD align=left valign=top input name=sel_group[] type=checkbox value=1Group ABR input name=sel_group[] type=checkbox value=2Group BBR input name=sel_group[] type=checkbox value=3Group CBR input name=sel_group[] type=checkbox value=4Group DBR /TD TD align=left input name=sel_cols[] type=checkbox value=Column AColumn ABR input name=sel_cols[] type=checkbox value=Column BColumn BBR input name=sel_cols[] type=checkbox value=Column CColumn CBR input name=sel_cols[] type=checkbox value=Column DColumn DBR input name=sel_cols[] type=checkbox value=Column EColumn EBR input name=sel_cols[] type=checkbox value=Column FColumn FBR /TD TD align=left input name=sel_cols[] type=checkbox value=Column GColumn GBR input name=sel_cols[] type=checkbox value=Column HColumn HBR input name=sel_cols[] type=checkbox value=Column IColumn IBR input name=sel_cols[] type=checkbox value=Column JColumn JBR input name=sel_cols[] type=checkbox value=Column KColumn KBR input name=sel_cols[] type=checkbox value=Column LColumn LBR /TD /TR /TABLE /CENTER input name=submit type=button value=Generate /form /fieldset Let's say the user wants to view Group A and Group B AND view content from the Coulmn A, Column B, Column D, and Column K. So a checkmark would be placed within each box and the Generate Report button would be hit to generate a report with titles situated horizontally. I'm assuming I'll need to create an array for both sel_group
Re: [PHP-DB] Creating checkbox list.
Hi, first you need connect to the database y attach on this example a litle extension class of Pear DB class. I suppose that your case use mysql database. this is an example: ? require_once db.clas.php $DB = array (); $DB['type'] = 'mysql'; $DB['host'] = '10.10.1.7'; $DB['user'] = 'youruser'; $DB['password'] = 'yourpassword'; $DB['dbname'] = 'yourdb'; function myCheck($op){ global $DB; $mdb = new mdb; $out = ; $q = select * from checkbox_table order by groups_name; if($db-db_dbArray($DB, $q)){ for($i=0;$icount($db-_db['data']);$i++){ $checked = ($db-_db['data'][$i]['groups_id'] == $i) ? checked : ; $out .= input name='sel_group[]' type='checkbox' value='{$db-_db['data'][$i]['groups_id']}' {$checked}{$db-_db['data'][$i]['groups_name']}BR; } } return $out; } ? form name=checkbox method=post action=?= $_SERVER['PHP_SELF']? ENCTYPE=multipart/form-data ?= myCheck($_REQUEST['sel_group']) ? /form On Tue, 2006-02-21 at 20:52 -0500, Jeff Broomall wrote: Good evening. I'm sure this is something easy so I'm hoping you can simply steer me to a good source. I simply need to create a Checkbox list using data from my groups table. I have a table with two fields: 1) groups_id 2) groups_name The data contained is simple: groups_id groups_name --- 1Group A 2Group B 3Group C 4Group D I would like to dynamically create a checkbox selection similar to: input name=sel_group[] type=checkbox value=1Group ABR input name=sel_group[] type=checkbox value=2Group BBR input name=sel_group[] type=checkbox value=3Group CBR input name=sel_group[] type=checkbox value=4Group DBR So I need a script that'll take this information from the groups table and create the above. Can you help? As I look at this, I believe I'm going to need to create an array for my final report. So I just added the [] after sel_group. Thanks. Ward -- - Luis Morales Consultor de Tecnologia Cel: +(58)416-4242091 - Empieza por hacer lo necesario, luego lo que es posible... y de pronto estarás haciendo lo imposible - db.class.php Description: application/php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Issues with Oracle
Creo q tu problema esta con la forma de conexion contra oracle, trata de usar contexiones persistentes contra la base de datos. Te anexo una clase que desarrolle y estoy usando desde hace mas de 4 años, quizas te ayude. En tu servidor local instala el soporte a pear http://pear.php.net/package/DB y luego ejecutas: pear install DB Con esto ya estaras listo para usar la clase. Te anexo un instructivo de como usarla: crear un pagina php: --- index.php -- ? require_once db.class.php; $DB = array (); $DB['type'] = 'oci8'; $DB['host'] = '10.10.1.7'; $DB['server'] = '10.10.1.7'; $DB['user'] = 'scott'; $DB['password'] = 'tiger'; $DB['dbname'] = 'demo'; $db = new mdb; $q = select (1+1) from dual; if($db-db_dbArray($MDB, $q)){ var_dump($db-_db['data'][0]); echo hr; }else{ echo $db-_db['debug']; echo hr; } ? Suerte, Luis Morales On Mon, 2006-02-20 at 15:22 -0400, ERNESTO PENALOZA wrote: php_info -- - Luis Morales Consultor de Tecnologia Cel: +(58)416-4242091 - Empieza por hacer lo necesario, luego lo que es posible... y de pronto estarás haciendo lo imposible - db.class.php Description: application/php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] handling of checkboxvalues
umm, ok... if you put your using echo: ? echo input type='checkbox' name='aus_id[]' value='{$aus_konto['konto']}'; ? Or over html : input type='checkbox' name='aus_id[]' value='?= $aus_konto['konto'] ?' On this way both samples must be ok. Good luck Luis Morales On Sun, 2006-02-12 at 10:33 +0100, Ruprecht Helms wrote: Luis Morales wrote: Well, you can do this... form name='my_form' method='post' action='form.php' ENCTYPE='multipart/form-data' input type='checkbox' name='user_loeschen[] value=?= $id ? id=?= $id? input type=submit name=submit value=send form /form Actually I have written this script to check the checkbox. This bring me an error telling me that I have forgot to set a ; but I think I ve coded something wrong with simple and dopple quots. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - Luis Morales Consultor de Tecnologia Cel: +(58)416-4242091 - Empieza por hacer lo necesario, luego lo que es posible... y de pronto estarás haciendo lo imposible - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] handling of checkboxvalues
Well, you can do this... form.php ? if($_POST['submit'] == 'send form'){ for($i=0;count($_POST['user_loeschen'])$i;$i++){ --- put here your sql statement to delete user --- ej... delete from users where id = '{$_POST['user_loeschen'][$i]}' --- } } ? form name='my_form' method='post' action='form.php' ENCTYPE='multipart/form-data' input type='checkbox' name='user_loeschen[] value=?= $id ? id=?= $id? input type=submit name=submit value=send form /form On Sat, 2006-02-11 at 17:48 +0100, Ruprecht Helms wrote: Hi, I want to have a function that delete some customers. The customers will be selected by cklicking on in checkboxes. This is the line I codes the checkboxes: input type='checkbox' name='user_loeschen[] value=id id=.[User-ID]. How can I use the checkboxvariable within another script and handle the id-value? I little codescripplet will help me. Regards, Ruprecht -- - Luis Morales Consultor de Tecnologia Cel: +(58)416-4242091 - Empieza por hacer lo necesario, luego lo que es posible... y de pronto estarás haciendo lo imposible - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] screen resolution!
Well, you can do use auto resize if you use 0% over height and width table's html tags. eg. table allign=center height=0% width=0% put your table content --- /table Regards, Luis Morales On Mon, 2006-02-06 at 09:28 -0800, Micah Stevens wrote: Yes, there is. It's called HTML. You might think me daft, but HTML was actually created to allow the page to adapt to screen size. The oldest technology on the block is actually the thing to use in this situation, otherwise you're just creating extra work for yourself. A simple example: table width=800px - This works great, looks great, until you have a 640x480 screen. Instead, try this: table width=80% (this scales according to screen size) or table (this scales according to content size + screen size) It really sounds like this is a problem with your web page design, not php or Javascript. However, you could indeed do as others suggested and create multiple pages.. That really sounds like more work than it's worth though. -Micah On Monday 06 February 2006 1:38 am, JeRRy wrote: Yes I know this but there is no script that can re-write webpages on the fly for certain resolutions? Instead of re-doing each page for each res.? With the technology these days I thought someone would of created something like this, so you create a website than you put it through a program that re-does the HTML for the resolutions you set and bingo the results are spat out and you add it to the site and use a little script to redirect depending on their set resolution. Jerry PHP Superman [EMAIL PROTECTED] wrote: Or you can have a page which detects resolution by javascript and redirects to another PHP page with the resolution data On 2/4/06, Bastien Koert [EMAIL PROTECTED] wrote: As the other poster mentioned you need JS to detect the screen widththe usual approach is to use js to detect the screen res and the include the appropriate CSS file to match the screen res. Bastien From: JeRRy [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] screen resolution! Date: Sun, 5 Feb 2006 02:44:19 +1100 (EST) Hi, I have written a website in PHP using MYSQL. But I have come accross an un-common problem. Normally when I create a website it's done on a desktop PC. But this time for the first time I did it on laptop meaning the screen resolution is different. Is there any sort of script/code I can use to create another section of my site in a desired screen resolution without me having to do it all manually? I know of many scripts online that I can DETERMINE visitors screen resolutions and recommend the correct one but don't know one that will adjust the website to suit that visitors screen resolution. Am aware of scripts that redirect to another web page but that requires you to write the website again to cater for that. Is there a quicker way/solution? Thanks! J -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - Luis Morales Consultor de Tecnologia Cel: +(58)416-4242091 - Empieza por hacer lo necesario, luego lo que es posible... y de pronto estarás haciendo lo imposible - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PostgreSQL 7.2 - 8.0 replication issue
Hi, I write an litle procedure about migration from postgres 7x to 8x. this is the link: http://fastonion.blogspot.com/2005/04/gentoo-migrando-postgres-7x-8.html In Resume you must be do: On current DB Server: su - postgres pg_dumpall /tmp/db.out On remote DB Server: copy db.out to new location on new server su - postgres psql -f db.out template1 Good Luck! Regards, Luis Morales On Mon, 2005-06-27 at 15:46 -0300, Martín Marqués wrote: El Lun 27 Jun 2005 15:31, Mark Galbreath escribió: I have to upgrade a web app from PHP 4.3.11 with PostgreSQL 7.2 to PHP 5.0.4 with PostgreSQL 8.0.3. Currently I have PHP4 (as Apache 2.54 mod on port 80) and PHP5 (default CGI mode on port 8181) running concurrently on my DEV box. I installed PostgreSQL 8.0.3 on the DEV box as well. On the PostgreSQL 7.2 server, I did a pg_dumpall db.out and ftp'd db.out to the PostgreSQL 8.0.3 (DEV) server. When I attempt to pg_restore db.out, the PostgreSQL archiver aborts with the error: input file does not appear to be a valid archive Never used pg_restore. I just do this: $ psql -f db.out Always worked for me. -- select 'mmarques' || '@' || 'unl.edu.ar' AS email; - Martín Marqués | Programador, DBA Centro de Telemática | Administrador Universidad Nacional del Litoral - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] connection from Linux/Apache/PHP/Freetds to MSSQL
Hi, I have some experience with odbtp project. This project offer an better api to connect MSSQL databases than freetds. Take an look on : http://odbtp.sourceforge.net/ you can also verify the examples on this page: http://odbtp.sourceforge.net/examples.html It's very easy to use. Have a nice day, Regards, Luis Morales On Wed, 2005-06-15 at 23:02 +0200, Flp Tams wrote: Freetds?? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Moving data from one MySQL table to another
Try do that whit phpmyadmin. Regards, Luis Morales Bastien Koert wrote: if the archive tables structures are identical and no processing needs to be done, why not use a 'select into table where ' and use the ids of the records to choose the ones that move? Bastien From: Jeffrey [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Moving data from one MySQL table to another Date: Thu, 19 May 2005 15:19:48 +0200 I'm working on a web application and one of the things I am doing is creating an archiving function that would move older data to archive tables in order to minimise the amount of data in the active tables. This so that the data that is being used more frequently can be accessed faster by the users. My approach in building the archive function is: 1) SELECT query on the data 2) mysql_fetch_array to put the data into an array 3) INSERT subqueries to put the data into the archive tables. My concern is that in some cases, hundreds of rows of data would need to be moved - which could lead to awfully big arrays. However, the archiving function is likely to be used infrequently - not more than 1 or 2 times per week. This leads to two questions: 1) Could such a big array cause performance problems or worse? 2) Is there a better way? Many thanks, Jeff -- 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
Re: [PHP-DB] Connecting to MS Access DB in PHP, on Linux, Apache
Sure!!! Take a look on: http://www.weberdev.com http://odbtp.sourceforge.net/ My personal suggest is to use odbtp whith pear DB interface. Regards, Luis Morales rob wrote: Anyone got any good websites or resources on how to connect to an access database and perform sql querrys etc, in Linux running apache? or if anyone has the connection strings required thanks in advance !! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Need some help
Why not use a sessions ? once posted your process form, you can store the final results on session vars and passing the results to other pages. Take a look on www.php.net on session topic. Regards, Luis Morales Murray @ PlanetThoughtful wrote: Sorry but this isn't working. The variable $ttl_price is a calculation in my first script. It stores the value of $Total_Price for all items. I am trying to pass that to a new page. It isn't a form that I'm working with, do I need to make it a form? I would greatly appreciate any help you could offer. The $_POST[] superglobal is only available to a page directly following a page with a form on it, when the form's method set to 'POST'. Id $ttl_price a single value or an array? If you are not using a form, you could possibly pass the value on the query string, then use $_GET[] in your target page to retrieve the value from the query string. This doesn't require the presence of a form on your originating page. Otherwise, you could also use sessions to put the value into a session cookie and then retrieve it from the target page, using the $_SESSION superglobal. How are you moving from the page in which the calculation is done to the page in which you need the calculation? Ie, do you click on a button, a link, do you redirect to the page etc? Much warmth, Murray -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Where are my form variables?
The best way is made an var_dump of $_POST array vars: ? var_dump($_POST) ? Regards, Luis Morales Juffermans, Jos wrote: Hi, If you expect your variables to be generated automatically, you may find that newer versions of PHP have that disabled by default - because it's less secure. Try to read $_POST{formfieldname} to get your data... To quickly find out all the post data that you received: ?php print pre; print_r($_POST); print /pre; ? Jos -Original Message- From: MIGUEL ANTONIO GUIRAO AGUILAR [mailto:[EMAIL PROTECTED] Sent: 03 May 2005 07:41 To: php-db@lists.php.net Subject: [PHP-DB] Where are my form variables? Hi!! I created a form with five text boxes, method=post and action=myscript.php; but I can't see the variables at the target script, why? Do I need a special sintaxis for accesing the POST array? Regards, -- MIGUEL GUIRAO AGUILERA -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] dbase and Debian
Leo G. Divinagracia III wrote: Ricardo Markiewicz wrote: Unfortunately, I can't convert the dbf files to SQL tables, so, i need dbase support in PHP :( connect via ODBC, perhaps? then ADOdb or PEAR it? you can do that. why not try with an class from phpclasses.com. I use dbf to mysql or symilar to export dbf data base to mysql or any RDBM. Regards, Luis Morales -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Concurrent rutines
Hello, Does any know how run many procedures concurrently over php. For example: $init = current_time; While (($t $timeout ) and ($allresult == 0 ) ){ $t = current_time - $init; launch{ $r[1] = app1; $r[2] = app2; $r[n] = appn; } $allresult = $r[1] $r[2] ... $r[n]; } Regards, LM -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php