[PHP] Hidden Form Help
Hi- I'm in a situation where I'm required to deal with a hidden form. The background details are exhausting, but the gist is: one form is auto-generated and lacks proper formatting. It was part of an open source package that DID NOT allow templating. So to keep using the application engine, but provide formatting, I created a CSS class to hide the unformatted form while displaying the formatted form. When submitting data to the database this doesn't seem to cause any issues. It accepts data based on the fieldvalues and ids. But when retrieving data to repopulate the form, what happens is that the hidden form gets the values and the displayed form does not. http://nahic.ucsf.edu/phpESP/survey.php login= Wisconsin Basically, if you complete the required field (state), fill out some random data, hit save, then select "resume" from the info page provided. You'll get back an empty form. But if you look at the code you'll see that the hidden form has the values. So I have a few questions: 1) Is there anyway to echo data from one field to the next, especially if the field (name or id) are exactly the same?? (i.e. field=state value=Wisconsin; if the field state is then repeated somewhere else on the page, can the value, Wisconsin, also be automatically repeated. 2) If yes, to the above can PHP do this and how? or is this something requiring Javascript or some other coding. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP guru needed urgently
Hi- I'm in urgent (today/tomorrow) need of someone with strong PHP programming skills. I was adapting phpESP http://www.butterfat.net/wiki/Projects/phpESP/ an open source Survey program and have run into a couple road blocks that far exceed my programming skills. The two things I'd like to accomplish are: 1) Change how page urls are handled so that redirects I created work. phpESP handles advancing pages without adjusting the url, but I need the url to change from something like http://survey/php to http://survey/php?p=2 . I've had to drammatically change the forms layout, and can't use the automatic forms created by the survey. I need to use the new forms for handling data. 2) Introduction of cookies or some sort of method of tracking, to insure that each of the new form pages are tagged to the proper user. The project is for a nonprofit, so I can't pay a lot. I can pay $50/hr for up to $200. Out of my own personal funds. I screwed up when I started estimating timelines on the project. I expected the survey urls to work the same way as the test urls; but they don't. And I'm just not that great at reading other peoples code to get a good handle on what needs to be changed where. If you've worked with phpESP or think your programming skills are strong enough to make the adaptations without having seen the program then please contact me at [EMAIL PROTECTED] Thanks Alnisa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Templating engines
At 5:43 PM -0800 4/28/05, Clive Zagno wrote: Hi all, What templating engines do you use with php and why? Ive been using smarty (http://smarty.php.net) I've used include(), and smarty, but now use Expression Engine http://www.pmachine.com. EE which is more of a CMS than just a templating system, but it has a world class templating system; and that rocks. One of are other programs swears by smarty, but I'd go with includes if I wasn't using EE. Alnisa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Protecting Queries
At 3:31 PM -0500 11/17/02, Stephen wrote: Since day one of me doing MySQL stuff in PHP, I've always set up my query as a variable then put it into the query function such as this: $query = "SELECT * FROM bobstuff WHERE id='1'"; $result = mysql_query($query, $connection); I've just come aware of the security risks of this. How could I make it so the $query variable isn't editable from the URL? Should I turn register_globals off? Typically speaking you should always use the PHP mysql_escape_string() function, when accepting data from users. While, I'm not certain its relevant in your situation, since your variable is predefined. But this would be of importance for any forms you would have. To use you just add some code such as: $usrName=mysql_escape_string($usrName); one for each field on a form, than you can do $result=mysql_result("SELECT * FROM abc WHERE usrName='$usrName', $gDB); This will protect you from users who enter Select, DROP, and other statements in your data field. ALnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . transforming nonprofits through technology . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phpLISTMAN
At 8:38 PM +0100 4/21/02, Randum Ian wrote: >Hi there, > >I am trying to find a Mailing List Manager on the net that is written in PHP >that access a database of emails, and other information, in order to manage >and maintain a list of subscribers. > Not to discourage your efforts, but there are an array of free and fee-based products written in PHP that handle mailing list. The bigger issue seems to be bi-directional distribution list (aka listservs), where both the owner and recipients can send mail. But for pure mailing list management, you could look at the people at Octeth http://www.octeth.com, their email manager pro gets high ratings. You could also test, try, and or modify one of the over 50 mailing list scripts coded in PHP at HotScripts.com. http://www.hotscripts.com/PHP/Scripts_and_Programs/Mailing_List_Managers/ Alnisa -- ..... Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . transforming nonprofits through technology . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mac Classic and PHP...
At 9:55 AM -0600 3/19/02, Geoff Hankerson wrote: >Well would you be so kind as to share your knowledge of where to pick up >scsi drives. Remember these are old Mac compatible scsi drives 50 pin or >something like that. Ahh. 50-pin haven't dealt with one of those in a while. I typically purchase through MicroWarehouse, but they have the 68-pin. You can purchase converters for 50-pin to 68-pin. But you can also try http://www.softwareandstuff.com a pretty good Surplus Computer place in Santa Clara. You can still purchase 9GB, 50-pin, SCSI through them. Alnisa -- ..... Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . transforming nonprofits through technology . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mac Classic and PHP...
At 8:48 AM -0600 3/19/02, Geoff Hankerson wrote: >I would worry about the hard drive failing on an old Mac. (This just >happened to me on an old 7300/180 and a bondi iMac at work). The older macs >use scsi hard drves that are hard to find and next to impossible to find >new. At least with a 7300 it has 3 pci slots and you can put an IDE >controller in one of the slots which will let you pick up a cheap IDE drive >as a replacement. That might be tough to do on a 5400. Wow, you find SCSI hard to find? I find it as easy as IDE to find, it's just more expensive. A -- ............. Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . transforming nonprofits through technology . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] does this work?
At 4:28 PM -0500 1/10/02, Erik Price wrote: > >PS: what I am -really- trying to do is dynamically fill in a > listbox with that correspond to all of the >records in a given table. Like so: > > > > foreach ($record_id_and_record_name_pair_pulled_from_mysql_query) { > print("${record_name}"); > } > ?> > > > >but I am unsure of how to grab multiple values from the >mysql_query() and load them into an array. Has anyone done this >before? > I've just recently done something very similar. The code is below. It looks a bit different because I like to include very little HTML in my PHP. But otherwise the concept should be the same. I should mention, that my code actually produces two pull down menu. My ultimate goal was to add a javascript to the sequence, so that when a user selects the item in the first pull down, it resubmits the query for the second pull down, and allows for pull down two to be dependent on pull down one. I haven't worked on the javascript as of yet. .. $staffID=$id; $results=mysql_query (" SELECT staff.staffID, teamMembers.accountID, accounts.clientID, clients.orgID, orgs.name AS client, accounts.description AS account FROMstaff, clients, orgs, accounts LEFT JOIN teamMembers ON teamMembers.accountID=accounts.accountID WHERE teamMembers.staffID=\"$staffID\" AND teamMembers.accountID=accounts.accountID GROUP BYaccounts.description ORDER BYorgs.name") or die("I've failed! Woe is ME!"); while ($row=mysql_fetch_array($results)){ $staffID= $row["staffID"]; $accountID = $row["accountID"]; $clientID = $row["clientID"]; $orgID = $row["orgID"]; $client = $row["client"]; $account= $row["account"]; // After the array is created, a small if elseif script is used to create the select menu. // Ideally the to menus will be separate scripts, I just want to test the theory first if($clientID != ""){ $selectClient .= "$client\n"; } else { $selectClient .= " \n"; } // Pull down list2, this displays the accounts pull down. if($accountID != ""){ $selectAccount .= "$account\n"; } else { $selectClient .= " \n"; } } ?> ... -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . transforming nonprofits through technology . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MySql Help
At 12:31 PM -0600 9/11/01, Jared Mashburn wrote: > >I am tring to run a query On the First Column and place the data into an >array. The problem that I am running into >Is that there are doubles, triples, and sometimes more of the same name >in that column. Each name represents something differnet in the >"Second" and "Third" and when I run a simple query (select "first" from >"table") I get (expectedly) all of the names in the Column "doubles" and >all. My question is , is there a way to select from a database and only >select one of each name from the column? > SELECT DISTINCT field1 FROM table1 ORDER BY field1 Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Swapping background color
I'm not certain if this is more an HTML question or a PHP issue, but... I'm creating an account management system, where each client can have multiple accounts, each account can have multiple users, and each user can make multiple requests. I've created a SQL Query that returns a list of all user requests, based on userID. I'd like to format the display so that it looks like: (white) $no $date $subject $priority $status (grey)$no $date $subject $priority $status how do I tell php to switch the background color of a row in a table, automatically? Alnisa -- ......... Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP / MySQL Hosting Charges
At 4:09 PM +1000 8/24/01, Chris Aitken wrote: >Hi All, > > >Just a quick non-technical question. > >I live in Australia and a friend of mine has a website hosted here >in Oz, and he pays his set amount per month which simply is for >Hosting, cgi-bin and log file access for his website. > >Hes wanting to have the ability to use PHP and MySQL on his site and >his provider has quoted him the cost to add to his current monthly >charges to give him a MySQL username/password/database and PHP >ability. > >Both he and I feel its a bit pricey for what they want to charge so >I figured I would ask the list to see what other people consider a >reasonable price to add PHP and MySQL access to his current >www/cgi-bin/logs website. Personally, I've always dealt with ISPs that offer PHP and MySQL as part of the basic monthly web hosting cost, which I generally expect to run between $20-$50 per month, depending on amount of space provided, backbone of the provider, and other variables. Can PHP be offered as an add-on, I thought it was either or not, but anyway... I've seen others pay separately for MySQL access. I would expect to pay between $5-$15 more per month, if it was a separate item. Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] while loop with if statement - here's the code
At 11:02 AM -0400 8/20/01, [EMAIL PROTECTED] wrote: > > >$results = mysql_db_query("$db", "select * from $table where $query order >by update_datetime desc limit $offset, 10"); > >while($one = mysql_fetch_array($results)){ > $id=$one["id"]; > $title=$one["title"]; > $description=$one["description"]; > > print " > height=8>HREF=/view_top.php3?id=$id>$title$description\n > width=10 height=6>\n > "; > }; > > if($results <= 0) > { > print " > NO >RESULTS\n > width=10 height=6>\n > "; > > } > >?> try... NO RESULTS\n \n "; else { print " $title$description\n \n "; }; } ?> The if should be before the print statement. You want it to compare then print, not print then compare. Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Design Help: Tracking Users
Hi all: I'm in the design stage of creating a client-account management system. We provide an array of support services to nonprofits, and I wish to develop a system that is more than just a basic service request system. I've been reading up on sessions management, as well as cookies. I've also been combing through a number of similar systems (either service request systems, or accounts management systems). My question is this: is there a specific reason to use a tracking table in conjunction with session ids, other than knowing how often a user logs in? I ask, because a few of the systems I've examined have tracking tables. But they all seem very brief just basically a trackid, sessionid, userid, datetime, with one or two other fields. I don't need to keep track of what each user is doing per say, but I'm wondering if there have been other innovative uses of tracking user sessions, that maybe I should consider. What types of things would you use tracking for? and why? Any comments would be appreciated. Alnisa -- ......... Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] to include php file into html file
At 10:20 AM -0500 8/15/01, Jack wrote: >I also tried > >into my html page, and it appears that nothing happen at all,. Looks like >the html page does not recognize the php tag. Is there any other way that >one can include a php file into a html file? >Jack set html as a php application in a .htaccess file. Something like: AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3 .php AddType application/x-httpd-php3 .phtml AddType application/x-httpd-php3 .html If set at the root level it should effect all files and folders. Alnisa -- ..... Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP: mysql_query()
At 5:25 PM +0200 8/14/01, _lallous wrote: >I have PHPMyAdmin 2.21 >I only see "GO" button, where can I upload my SQL file? > Well my ISP uses PHPMyAdmin 2.10, which I can't imagine would be that different from 2.21. Basically, if I load, and click on the database name in the left top corner: Home + databasename To the right, the window display will list all my databases, action options and number of records. Under that area is a text box where I can enter SELECT statements, or upload queries as text files. The screen generally looks like: PHPMyAdmin Window (Right Pane Only) table Action Records . tb1 Browse Select Insert Properties Drop Empty150 tb2 Browse Select Insert Properties Drop Empty2456 . Run SQL query/queries on database"databasename" [Documentation]: . : : : : : text box: : : . or Location of the textfile: . : file upload : Browse . Go ... The Go button will perform either information from the text box, or an indicated file. I believe it's a typical install of PHPMyAdmin, but I could be wrong. Alnisa -- ............. Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP: mysql_query()
At 4:05 PM +0200 8/14/01, _lallous wrote: >Basically I have PHPMyAdmin... >If I am to paste the 33,000+ lines SQL query the PHPMyAdmin would take more >than 30secs to execute it which will make everything fail! >Anyway, I solved it. Check the recent post in the same thread about SQL2PHP >script. > You don't have to past, you just upload the file, as a SQL query, and select go. If the file still fails, just break it in two. fileinsert1.sql, fileinsert2.sql, I've seen people insert over 60,000 records this way no errors. I've personally never worked with more than 10,000 records at a time, but if time outs are the issue, then just break the file into smaller files. Alnisa -- ......... Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP: mysql_query()
At 2:21 PM +0200 8/14/01, lallous wrote: >I can't execute MySql via system() I have no rights! > Generally ISPs either give you shell rights or access to PHPMyAdmin, if they give access to a MySQL database. Otherwise, you'd never be able to add tables, or modify data. If PHPMyAdmin is installed, you can general locate it in the following manner: your_url/phpmyadmin So http://www.my_crazy_domain.com/phpmyadmin You'll need to enter your database username and password, but this will allow you to upload INSERT statements, perform routine MySQL tasks, as well as run SQL queries. Otherwise you need to request shell access from your ISP. Some ISPs only provide it when asked. Alnisa -- ......... Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] to include php file into html page
At 4:32 PM -0500 8/14/01, Jack wrote: >Hi people >I have tried to include php file into html page using the syntax >below and it said syntax error at this part when the page is loaded. >What is wrong with calling php file this way? Or is there any other >way to call php file from html page? > >*** > > >
Re: [PHP] Determining File Size
At 3:39 PM -0700 7/24/01, Bob Scott wrote: >There's a nifty little function called filesize()... > >I've done this before to make human-readable output: > >$my_file = "/path/to/my/file"; > >$file_size = filesize($my_file); > >if ($file_size >= 1073741824) { > $show_filesize = number_format(($file_size / 1073741824),2) . " >GB"; >} elseif ($file_size >= 1048576) { > $show_filesize = number_format(($file_size / 1048576),2) . " MB"; >} elseif ($file_size >= 1024) { > $show_filesize = number_format(($file_size / 1024),2) . " KB"; >} elseif ($file_size >= 0) { > $show_filesize = $file_size . " bytes"; >} else { > $show_filesize = "0 bytes"; >} > >echo "File $my_file is $show_filesize "; Wow!! Can I be effusive!!! :) It worked like a charmed. I just added my path statement, and then placed the $show_filesize after the url to the document. It's beautiful!!! Thanks! Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Determining File Size
Hi: I've set-up a library/clearinghouse system that basically allows to add papers and materials to a small member only resource library. I'd like to be able to determine the file's size so that it's displayed next to the item, so that people can gage how long it will take to download items. This seems particularly relevant for some of the older material included, since they consist of abnormally large PDF files (they scanned paper to image, then converted to PDF) Is the best method for handling this to determine the file size at upload, and then send the information to MySQL, or some other method. Alnisa -- ......... Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]