[PHP-DB] Date problem
Hi there everyone, I use the below code to grab the current date, convert it to a unix timestamp to do some bits then it's supposed to change the date back with the new values (IE: current date - x amount of seconds) but it's not doing it correctly, it's probably DEAD obvious to everyone as my brain has probably fried :-) But here's the code, when I convert it back to d,m,Y it says it's 2004 which it shouldn't. Thanks Chris --- $secsinweek = 604800; $numweeks = $secsinweek * 7; $curdate = date(d-m-Y); // Split the strings into day, month, year list($cd, $cm, $cy) = split(-, $curdate); // Create unix time stamps for the start and end date $now = mktime(0,0,0,$cd,$cm,$cy); // Do some number crunching here // $newnow = $now-$numweeks; echo $now; $converted_date = date(d-m-y,$now); echo br$converted_date;
[PHP-DB] Is persistent connection + MySQL + Apache + insert_id === safe?
Hi there, I suspect you out there know the answer to this one... If you have a MySQL db on Apache with mod php and you are using php with a persistent connection, what happens when two people hit your webserver at the same time? In particular, if the page runs an insert query on a table with an auto_increment field what can happen to insert_id? If you do the Insert and then immediately call insert_id, are you guaranteed to get the relevant insert_id result? Or is it possible for the other page (call it person_page_2) to get some execution time on the webserver, use the same persistent connection and insert. If that can happen, then do you get the right insert_id value back when person_page_1 resumes? Or do you get the most recent, which would be the insert from person_page_2? Thanks, Jeff Veit http://www.tanasity.com/ - Tanasity develops software and net applications - radical web update next week - and I've said this for 3 months http://www.tangledtime.com/ - Occasional blog about the net, software and business http://www.chase.org.uk/ - Cambridge Hi-Tech Association of Small Enterprises - brilliant networking for hi-tech companies around Cambridge, UK http://www.chaseconference.org.uk/ - Where Angels Dare and VCs also Tread - October 10th 2002 - it's happened but I'm very proud of how successful it was Tanasity Mobile: +44 (0)7812 217448 Tel: +44 (0)1223 721499 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP, LDAP and the root DSE
Hi all, We've been having fun and games using PHP to query an Active Directory (Windows 2000) via the LDAP interface. It's all been very successful and we've got a whole load of ideas for various internal web based services all hooked in to the AD. The one thing that's got us stumped though, is how on earth do you query the root DSE from PHP? I can do it from the command line using the OpenLDAP ldapsearch tool e.g. ldapsearch -x -h domcon -s base -b objectClass=* Works a treat - it returns the the root DSE. Try the same thing from PHP... $ds=ldap_connect(ldap://domcon;); ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); ldap_bind($ds,[EMAIL PROTECTED],mypassword); $sr=ldap_read($ds,,objectClass=*); echo ldap_count_entries($ds,$sr); $info = ldap_get_entries($ds,$sr); echo pre; print_r($info); echo /pre; ldap_close($ds); ... and you get nothing. :-( I can get at everything other than the root DSE. A couple of things to note: * Technically you don't actually need to bind with an AD server to get at the root DSE (correct me if I'm wrong!) * The PHP ldap_read function uses BASE as its search scope. So has anybody managed to read the root DSE from PHP and if so how?! (We're running PHP 4.3.2, Apache 1.3.20 and OpenLDAP 2.0.11 libraries on a Red Hat 7.2 i386 box). Dan. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] MSSQL date format problem
hi, I have seen solution for my problem, but I couldn't find and I'm in a hurry - please help. Problem is, how to set default datetime format while using mssql functions? With ODBC, there is format: -mm-dd hh:mm:ss[.fff] but wih using db-library there is: mmm dd hh:mmxx where xx is either AM or PM how to set default datetime format? I have used ini_set(mssql.datetimeconvert,0); in my php scripts and it works fine for MSSQL 7, but not for MSSQL 2000 please help 5o -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] [php] printing query output to a printen and or file
hello i'm busy with generating some overviews out of a mysql database (with php) this are aroudn 8 different overviews and query's. and the output to the screen is very nice. but now i'm also want to give the visiter the option to send the output to a printer of file. but how do I manage that? and can you also add some options for the 'format' to be different when printing or viewing it on the screen? Kind regards, mark
Re: [PHP-DB] Is persistent connection + MySQL + Apache + insert_id=== safe?
Jeff Veit - Tanasity wrote: If you have a MySQL db on Apache with mod php and you are using php with a persistent connection, what happens when two people hit your webserver at the same time? In particular, if the page runs an insert query on a table with an auto_increment field what can happen to insert_id? If you do the Insert and then immediately call insert_id, are you guaranteed to get the relevant insert_id result? Or is it possible for the other page (call it person_page_2) to get some execution time on the webserver, use the same persistent connection and insert. If that can happen, then do you get the right insert_id value back when person_page_1 resumes? Or do you get the most recent, which would be the insert from person_page_2? It's safe. The value returned by mysql_insert_id() is tied to your connection. So even if you do an insert and 100 other pages do insert before you call mysql_insert_id(), you'll still get your value and none of theirs, no matter how quickly it happens. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals www.phparch.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] failure in Uploadfunction
Hi, I want to make a fileupload via php within a script that insert values into a database. By executing the script I get the error that ftp-put can function, because there is no correct login into the ftp-server (user and password is required). Replace the emailadress against the userpassword I get no error, but I get no result - file in the subfolder upload of the directory-path. I tried ftp-login but it also fails with a error. As FTP-Server I use the proftpd. $conn_id=ftp_connect('127.0.0.1'); ftp_login($conn_id,'rhelms','[EMAIL PROTECTED]'); $upload=ftp_put($conn_id,'/srv/www/htdocs/chorportal/upload/'+$logo,$logo,FTP_BINARY); if (!$upload) { echo FTP failed; } else { echo FTP-Upload successful; } How have I to correct the script that the upload functions properly. Regards, Ruprecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] apache and php extensions
Hi all, I have php 4.3.1 and Apache 2 installed..it works fine unless I activate an extension (e.g. domxml.dll) the apache startup gives a Unkown(): Unable to load dynamiclibrary './extensions\php_domxml.dll' - One of the library files needed to run this application cannot be found Any ideas? What php.ini config (extension dir is set to ./extensions) do i need to setup or apache config I need to change? Thanks Neil
[PHP-DB] windows explorer
Hello , i want to make an windows explorer like application in Php where on the left hand side i have the folders with + or - sign and if i click on + sign it should show me the sub-folders in that folder just like we can see in windows explorer, and when i click on - then it should fold back and only show the main folders. Also if someone click on the folder then he can see all the items in that folder on the right hand sign frame. hope u can provide with some input on how to do the same or where to get codes for the same . thanks in advance. - Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo.
[PHP-DB] Re: MSSQL date format problem
believe or not, I solved it just by updating from PHP 4.3.1 to 4.3.2 :-) 5o Peter Misun wrote: hi, I have seen solution for my problem, but I couldn't find and I'm in a hurry - please help. Problem is, how to set default datetime format while using mssql functions? With ODBC, there is format: -mm-dd hh:mm:ss[.fff] but wih using db-library there is: mmm dd hh:mmxx where xx is either AM or PM how to set default datetime format? I have used ini_set(mssql.datetimeconvert,0); in my php scripts and it works fine for MSSQL 7, but not for MSSQL 2000 please help 5o -- Mgr. Peter Misun MicroStep-MIS, Ilkovicova 3, 841 04 Bratislava, Slovakia tel: +421/ 2/ 602 00 127, 111, fax: +421/ 2/ 602 00 180 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] windows explorer
What you're looking for is available in a number of JavaScripts out there. I'd suggest a search on Google for things like javascript tree or other things along that line. There are quite a few out there so you'll have to sift through them to find the one that really suits your needs. Here's one I used: //Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02) //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com Hope this helps. Rich -Original Message- From: gates bill [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] windows explorer Hello , i want to make an windows explorer like application in Php where on the left hand side i have the folders with + or - sign and if i click on + sign it should show me the sub-folders in that folder just like we can see in windows explorer, and when i click on - then it should fold back and only show the main folders. Also if someone click on the folder then he can see all the items in that folder on the right hand sign frame. hope u can provide with some input on how to do the same or where to get codes for the same . thanks in advance. - Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: windows explorer
http://www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/index.html Gates Bill wrote: Hello , i want to make an windows explorer like application in Php where on the left hand side i have the folders with + or - sign and if i click on + sign it should show me the sub-folders in that folder just like we can see in windows explorer, and when i click on - then it should fold back and only show the main folders. Also if someone click on the folder then he can see all the items in that folder on the right hand sign frame. hope u can provide with some input on how to do the same or where to get codes for the same . thanks in advance. - Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Connect User from website does not work.
I have created a user webuser with the following line. mysql grant all privileges on *.* to [EMAIL PROTECTED] identified by 'xx'; mysql grant all privileges on *.* to [EMAIL PROTECTED] identified by 'xx'; I would think that this should have unlimited access to the database from the website.? I can connect to mysql from the command line using the user webuser. I received no errors when I created the user and verified that the user exist in the user database. When I try to connect to the database I get the following error: Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/count/get_conf.inc.php on line 4 Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/count/get_conf.inc.php on line 4 Any suggestions ? I am using php 4.2.2 apache 2.0 and mysql 3.23.52 on Redhat 8 The script is trying to connect to the database and create a table. TIA Larry Sandwick Sarreid, Ltd. Network/System Administrator phone: (252) 291-1414 x223 fax : (252) 237-1592
Re: [PHP-DB] Connect User from website does not work.
I have created a user webuser with the following line. mysql grant all privileges on *.* to [EMAIL PROTECTED] identified by 'xx'; mysql grant all privileges on *.* to [EMAIL PROTECTED] identified by 'xx'; I would think that this should have unlimited access to the database from the website.? I can connect to mysql from the command line using the user webuser. I received no errors when I created the user and verified that the user exist in the user database. When I try to connect to the database I get the following error: Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/count/get_conf.inc.php on line 4 Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/www/html/count/get_conf.inc.php on line 4 As you can see from the error message, you're not connecting from localhost. When trying to connect from a PHP script, MySQL sees you as coming from a host www.Sarreid2.com. So, use another GRANT command to also grant your user permission from this host. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Connect User from website does not work.
Did you FLUSH PRIVILEGES after creating your user? We're off the subject of PHP, but you don't have to do this with the GRANT command, btw. :) ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Easier Queries
Here's what I'm thinking, just looking to see if anyone has done this or similar. - I have a MySQL DB and I create an ODBC datasource for it on my windows box - I then open MS Access and link the tables from my datasource - Access provides a graphical relationship builder, so I build relations in this - Access also provides a graphical query builder that uses the stored relationships - So I build a query, view the SQL and use the SQL code in some mysql_ PHP functions - Maybe next I instead save the queries in a query table so I can get them via simple name, like 'All_Customers' Sort of analogous to MS SQL Views? Sound good, or is there a better way? TIA -Shawn -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP - Apache config problem
Howdy everyone, I'm in the process of setting up a new development environment with Apache 1.3.27 and PHP 4.3.2 on a Win2k machine with SP2. I'm getting an error message from apache saying that it can't find the c:/php/sapi/php4apache.dll . However, that is indeed where the dll is located. This is the exact line in httpd.conf that apache is choking on:LoadModule php4_module c:/php/sapi/php4apache.dll . Funny thing is, I have the same http.conf file in another Win2k machine running the same apache version but with PHP 4.2.3 , and everything is OK. Anyone have any ideas? Thanks in advance. David -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] windows explorer
What I would recommend is using PEAR's HTML_TreeMenu package for this. http://pear.php.net/package-info.php?package=HTML_TreeMenu I use it quite a bit in applications .. .download the souce (make sure you have PEAR configured), and it even comes with an example. Cheers, ~Steve quote who=Hutchins, Richard What you're looking for is available in a number of JavaScripts out there. I'd suggest a search on Google for things like javascript tree or other things along that line. There are quite a few out there so you'll have to sift through them to find the one that really suits your needs. Here's one I used: //Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02) //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com Hope this helps. Rich -Original Message- From: gates bill [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] windows explorer Hello , i want to make an windows explorer like application in Php where on the left hand side i have the folders with + or - sign and if i click on + sign it should show me the sub-folders in that folder just like we can see in windows explorer, and when i click on - then it should fold back and only show the main folders. Also if someone click on the folder then he can see all the items in that folder on the right hand sign frame. hope u can provide with some input on how to do the same or where to get codes for the same . thanks in advance. - Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. -- 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] Date problem
snip // Do some number crunching here // $newnow = $now-$numweeks; echo $now; $converted_date = date(d-m-y,$now); echo br$converted_date; /snip You should be running your $convewrted_date on $newnow, not $now Gary Every Sr. UNIX Administrator Ingram Entertainment (615) 287-4876 Pay It Forward mailto:[EMAIL PROTECTED] http://accessingram.com -Original Message- From: Chris Payne [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2003 3:45 AM To: php Subject: [PHP-DB] Date problem Hi there everyone, I use the below code to grab the current date, convert it to a unix timestamp to do some bits then it's supposed to change the date back with the new values (IE: current date - x amount of seconds) but it's not doing it correctly, it's probably DEAD obvious to everyone as my brain has probably fried :-) But here's the code, when I convert it back to d,m,Y it says it's 2004 which it shouldn't. Thanks Chris --- $secsinweek = 604800; $numweeks = $secsinweek * 7; $curdate = date(d-m-Y); // Split the strings into day, month, year list($cd, $cm, $cy) = split(-, $curdate); // Create unix time stamps for the start and end date $now = mktime(0,0,0,$cd,$cm,$cy); // Do some number crunching here // $newnow = $now-$numweeks; echo $now; $converted_date = date(d-m-y,$now); echo br$converted_date;
Re: [PHP-DB] PHP/ODBC/Apache/Netware/Foxpro Problem
What is the setting of the ODBC connect string parameter SOURCEDB? Does the PC running Apache have permission to access the path specified by SOURCEDB? -- bob On Mon, 14 Jul 2003, YT Lee wrote: I have a Windows XP PC configured as follow: 1. Apache 2.0.46 2. PHP 4.3.2 3. Microsoft Visual Foxpro ODBC Driver The PC is connected to a Netware 3.2 server. The database are implemented as Foxpro 2.6 free tables on the Netware server. The PC is connected to the server via Netware client version 4.83 SP1E. Using WinSQL Lite, I can access the Foxpro tables on the Netware server from the PC through ODBC. Using PHP command line mode, I can also execute the following PHP script on the PC without problems: --- fp.php --- ?php $link = odbc_connect ('foxtest', '', '', 0) or die (Could not connect); print (Connected successfully to foxtest); $result = odbc_exec($link, SELECT * FROM SVCCAR); if (!$result) { echo odbc_error(); exit; } odbc_close ($link); ? -- fp.php However, when I try to run the same script from Apache using a browser, an error occurs and the output is as follow: --- output --- Connected successfully to foxtest Warning: SQL error: [Microsoft][ODBC Visual FoxPro Driver]File 'svccar.dbf' does not exist., SQL state S0002 in SQLExecDirect in C:\htdocs\php\FP.PHP on line 9 S0002 output --- It appears that PHP is able to connect to the ODBC but it is not able to see any tables on the Netware disk. If I move the Foxpro files to the PC's hard disk, the script runs fine. Any assistance is highly appreciated. -- 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] UPDATE query
$query1 = UPDATE news,autori SET news.titolo='$titolo', news.testo='$testo', news.data='$data', news.nome='$nome', autori.mail='$mail' WHERE news.nome = autori.nome AND id='$id'; You can't do an update across tables the last time I checked. Even if it's possible in newer versions, using mysql_error() after your query will tell you what the error is. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PHP - Apache config problem
FYI: OOPS!! I dug around in the install.txt file in PHP, and found that php4ts.dll needs to be relocated to either where apache.exe resides, where php4apache.dll resides, or in the windows system directory. All now works as expected. David [EMAIL PROTECTED] on 07/14/2003 11:35:42 AM To: [EMAIL PROTECTED] cc:(bcc: David P. Giragosian/MDACC) Subject: [PHP-DB] PHP - Apache config problem Howdy everyone, I'm in the process of setting up a new development environment with Apache 1.3.27 and PHP 4.3.2 on a Win2k machine with SP2. I'm getting an error message from apache saying that it can't find the c:/php/sapi/php4apache.dll . However, that is indeed where the dll is located. This is the exact line in httpd.conf that apache is choking on:LoadModule php4_module c:/php/sapi/php4apache.dll . Funny thing is, I have the same http.conf file in another Win2k machine running the same apache version but with PHP 4.2.3 , and everything is OK. Anyone have any ideas? Thanks in advance. David -- 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: Re: [PHP-DB] UPDATE query
Can someone please unsubscribe/boot the ydnarb.com address below? Every time I send a message to the list I receive a blank reply from the address. I assume this is happening for others, also. ---John Holmes... - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 14, 2003 2:32 PM Subject: Re: Re: [PHP-DB] UPDATE query -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] apache and php extensions
I have php 4.3.1 and Apache 2 installed..it works fine unless I activate an extension (e.g. domxml.dll) the apache startup gives a Unkown(): Unable to load dynamiclibrary './extensions\php_domxml.dll' - One of the library files needed to run this application cannot be found Any ideas? What php.ini config (extension dir is set to ./extensions) do i need to setup or apache config I need to change? ? different / and \ Windows needs \, and I normally set the full path to extensions. -- Lester Caine - L.S.Caine Electronic Services -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] [php] printing query output to a printen and or file
CSS is your only option; not sure yet if the page break option in CSS actually works or not. Use px widths (table class='wide'; wide class is wide { width:500px; }) and such. Peter On Mon, 14 Jul 2003, Snijders, Mark wrote: hello i'm busy with generating some overviews out of a mysql database (with php) this are aroudn 8 different overviews and query's. and the output to the screen is very nice. but now i'm also want to give the visiter the option to send the output to a printer of file. but how do I manage that? and can you also add some options for the 'format' to be different when printing or viewing it on the screen? Kind regards, mark --- Peter Beckman Internet Guy [EMAIL PROTECTED] http://www.purplecow.com/ --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: any Help !! the only way have to ODBC to Linux
Go to http://www.mysql.com/downloads/api-myodbc.html or http://www.mysql.com/downloads/api-myodbc-3.51.html and download the driver for linux. Hope this is what you were asking for. Chris = Nabil [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have an Linux server running Apache/PHP/MySQL. and I need to connect to another server running MSSQL server 7 THE POINT IS the only way I have to connect is throu ODBC connection because the network administrator only allowed me to connect thru port 1433 that ODBC uses.. I tried to make it direct connection, but this way uses many ports that the firewall won't allowed.. He said for security reasons that he can't open those ports to prevents hackers to use them ... do u think this is a true ? any advice what port the direct connection uses??? does it uses NetBIOS? if he was right ... so I have to change to ODBC I heard about FreeDTS and iODBC, but I need some advice and notes to make it easy for me.. Please HELP.. and your valuable comments will be appreciated.. Nabil -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Logic Advice?
Hi Guys, Here's the deal: I have a page the lists patterns. In this page is a link that opens up a window that displays ALL the threads available in the database. Threads need to be related to patterns. What I mean by this is that I need the ability to select (with a checkbox) the thread listing for when I process the form, the patternID and the threadID are saved in a table. In addition to.. I need to be able to select ( from a checkbox) whether or not this thread is available for direct ordering or not. Here's some code: (opener link): a href=JavaScript:windowOpener('openthreads.php?patternID=?php echo $id; ?', 500, 370) (popup): ?php $threadQuery = db_query(SELECT * FROM kcs_threads); for ($i=0;$threadResults = db_fetch($threadQuery);$i++) { $threadselectQuery = db_query(SELECT * FROM kcs_patternthreads WHERE pattern_index='$patternID'); while ($threadselectResult = db_fetch($threadselectQuery)) { ? input type=hidden name=threadPattern_index[?php echo $i; ?] value=?php echo $threadselectResult[id]; ? input type=hidden name=thread_index value=?php echo $threadResults[id]; ? input type=hidden name=pattern_index value=?php echo $patternID; ? tr valign=top td class=adminthreadsDisplayText align=centerinput type=checkbox name=select[?php echo $i; ?] value=1 ?php if ($threadselectResult[thread_index] == $threadResults[id]) echo checked; ?/td td class=adminThreadsDisplayText align=left?php echo trimString($threadResults[manufacturer],19); ?/td td class=adminthreadsDisplayText align=left?php echo $threadResults[colourID]; ?/td td class=adminthreadsDisplayText align=left?php echo trimString($threadResults[colour],19); ?/td td class=adminthreadsDisplayText align=centerinput type=checkbox name=avail[?php echo $i; ?] value=1 ?php if ($threadselectResult[thread_index] == $threadResults[id] $threadselectResult[avail] == 1) echo checked; ?/td /tr tr tdimg src=../Graphics/spacer.gif width=80 height=1/td tdimg src=../Graphics/spacer.gif width=110 height=1/td tdimg src=../Graphics/spacer.gif width=80 height=1/td tdimg src=../Graphics/spacer.gif width=110 height=1/td tdimg src=../Graphics/spacer.gif width=80 height=1/td /tr ?php } } ? If this were split into an add and an edit page I could easily do what I'm asking but I'm trying to save some steps. Does anyone have any logic advice for processing? Thanks in advance! Aaron
[PHP-DB] PHP with Javascript
Hi there everyone, I have a problem, I am populating my first dropdown box on my form from my MySQL DB with PHP no problem, but when I select the item it has to refresh the whole page to put the items into the second dropdown box, is there an EASY :-) way of populating the second box with Javascript so that the page doesn't have to refresh? I'm a total Jscript newbie, but I figured that Jscript is what I need to use with PHP and MySQL to achieve this? I know this is somewhat about Jscript but it's also about PHP and MySQL :-) I just need to find the best way to populate the second box without having to refresh the whole, page so any ideas/examples would be very welcome :-) Thanks for everything. Chris