Jump to content

ann

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by ann

  1. I got a libphp5.so generated and php running from the command line. (It's still not running in a browser though) This is the page/code that helped me out. http://serverfault.com/questions/35696/how-do-i-reinstall-php-on-my-system # apt-get install build-essential devscripts # apt-get source php5 # cd php5-* # vim debian/rules # debuild -us -uc -b
  2. Hi sapna Did you find an answer to this issue? I have the same problem.
  3. Thanks for replying I hadn't realised #php -v and #php /var/www/html/php_info.php were also giving different versions of php! php5-cli was installed and removed with apt-get and apt-get claims it's not installed now... #apt-get remove php5-cli Reading package lists... Done Building dependency tree Reading state information... Done Package php5-cli is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. I've tried again to delete all the php files, restarted apache and when I load php_info.php in a browser PHP Version 5.2.4-2ubuntu5.10 is still running?!? but I can't use php from the command line because there's no executable. (I have check that edits to php_info.php are shown in the browser). I need to be able to get rid of PHP Version 5.2.4 or reconfigure it --with-mysql. Any suggestions? Thanks
  4. Dear All Please can someone help? I get different version of php used from the command line than I get with a browser. I've tried removing all php with 'apt-get remove' and deleted everything php that I dared like... 350 rm -rf /var/lib/php* 351 rm -rf /usr/local/bin/php* 352 rm -rf /usr/bin/php* 353 rm -rf /etc/php* 364 rm -rf /var/lib/dpkg/info/php* 369 rm -rf /usr/share/phpmyadmin 372 rm -rf /usr/share/php5 375 rm -rf /usr/share/doc/phpmyadmin 378 rm -rf /usr/share/doc/php5* 381 rm -rf /usr/local/lib/php 384 rm -rf /usr/local/include/php 387 rm -rf /usr/lib/php5 388 rm -rf /usr/bin/php 389 rm -rf /etc/cron.d/php5 429 rm -rf /usr/local/lib/php Then configured and installed php-5.3.3. From the command line I get php-5.3.3 with mysql... root# php /var/www/html/php_info.php <html> <head> </head> <body> <center>php info file</center><br><br> phpinfo() PHP Version => 5.3.3 System => Linux bicr-bioinf4 2.6.24-28-generic #1 SMP Wed May 26 23:34:09 UTC 2010 x86_64 Build Date => Aug 19 2010 12:05:17 Configure Command => './configure' '--with-mysql' <snip> but loading the same file in a browser I get 5.2.4 with no mysql... php info file PHP Logo PHP Version 5.2.4-2ubuntu5.10 System Linux bicr-bioinf4 2.6.24-28-generic #1 SMP Wed May 26 23:34:09 UTC 2010 x86_64 Build Date Jan 6 2010 21:42:59 Server API Apache 2.0 Handler Virtual Directory Support disabled Configuration File (php.ini) Path /etc/php5/apache2 Loaded Configuration File (none) Scan this dir for additional .ini files /etc/php5/apache2/conf.d PHP API 20041225 PHP Extension 20060613 Zend Extension 220060519 Debug Build no Thread Safety disabled Zend Memory Manager enabled IPv6 Support enabled Registered PHP Streams zip, php, file, data, http, ftp, compress.bzip2, compress.zlib, https, ftps Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.* <snip> I've stopped and started apache, closed and opened various browsers, so I know I'm looking at the right server and it's not chached. What am I missing? Many thanks root# uname -a Linux bicr-bioinf4 2.6.24-28-generic #1 SMP Wed May 26 23:34:09 UTC 2010 x86_64 GNU/Linux root# apache2 -v Server version: Apache/2.2.8 (Ubuntu) Server built: Jun 18 2010 14:04:18 root# php -v PHP 5.3.3 (cli) (built: Aug 19 2010 09:25:31) Copyright © 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright © 1998-2010 Zend Technologies
  5. Hi I've got a page with a number of dependent dropdown menus. i.e. using car manufacturer/models as an example...If the user selects 'Ford' as a manufacturer javascript reloads the page with ?manufacturer=Ford in the url and php restricts the model dropdown to models made by Ford. It works the other way too, if they select a model first the list of manufacturers is restricted. Things just got more complicated and users may select up to 3 models from the same manufacturer. If I turn the form element 'model' into an array how do I get javascript to work with it? I just need what to to with the call to the reload() function and the javascript. I can deal with php arrays. Many thanks Bits of my code for a single model... html <select name="make" onchange="reload(this.form,'select.php')" > <option value="0" selected></option> <option value="1">Ford</option> <option value="2">VW</option> <option value="4">Opal</option> </select> <select name="model" onchange="reload(this.form,'select.php')" > <option value="0" selected></option> <option value="4">fiesta</option> <option value="23">fabia</option> <option value="24">td9</option> </select> php function ddmodel(){ #model if (isset($_REQUEST['make']) and $_REQUEST['make']>0) { $mainquery="SELECT DISTINCT id,model FROM model where make=".$_REQUEST['make'] } else {$mainquery="SELECT id,model from model"; } $string= "<td><select name=\"model[".$n."]\" onchange=\"reload(this.form,'".$_SERVER['PHP_SELF']."')\" >"; $string.= "<option value=\"0\" selected></option>\n"; $ddsql_result = mysql_query($mainquery); if(mysql_num_rows($ddsql_result)){ while($ddrow = mysql_fetch_assoc($ddsql_result)){ if ($_REQUEST['model']==$ddrow['id']) { $string.= "<option value=\"".$ddrow['id']."\" selected>".$ddrow['model']."</option>\n"; } else {$string.= "<option value=\"".$ddrow['id']."\">".$ddrow['model']."</option>\n";} }} $string.= "</select></td>\n"; return $string; } function ddmake(){ #make if (isset($_REQUEST['model']) and $_REQUEST['model']>0) { $mainquery="SELECT make.make,make.id from make left join model on (make.id=model.make) where model.id=".$_REQUEST['model']; } else {$mainquery="SELECT make,id from make order by make"; } $string= "<td><select name=\"make\" onchange=\"reload(this.form,'".$_SERVER['PHP_SELF']."')\" >"; $string= "<option value=\"\"selected></option>\n"; $ddsql_result = mysql_query("$mainquery"); if(mysql_num_rows($ddsql_result)){while($ddrow = mysql_fetch_assoc($ddsql_result)){ if ($_REQUEST['make']==$ddrow['id']) { $string.= "<option value=\"".$ddrow['id']."\" selected>".$ddrow['make']."</option>\n"; } else { $string.= "<option value=\"".$ddrow['id']."\">".$ddrow['make']."</option>\n"; } }} $string.= "</select></td>\n"; return $string; } javascript function reload(form,selfid){ var str='?'; if (form.make && form.make.options[form.make.options.selectedIndex].value>0) { str +='&make=' + form.make.options[form.make.options.selectedIndex].value; } if (form.model && form.model.options[form.model.options.selectedIndex].value>0) { str +='&model=' + form.model.options[form.model.options.selectedIndex].value; } self.location=selfid + str; }
  6. I'm sure your right but the real problem was I hadn't closed the select tag. A </select> after the last </option> sorts it out. Thanks for the help.
  7. Update I can get rid of the unwanted text box by changing the line to... <div id="divXXX" style="display:none"><input type=hidden></div><!--why do I need this--> But if you know the 'proper' solution to the problem I'd be grateful for the insight. Cheers
  8. Hi, I want the contents of a text box to change with the selection from a dropdown menu. The script below works, but only if I include the line marked <!--why do I need this-->. If I delete this line the page loads without error but I get document.getElementById("divSCO0") is null when I make a selection and no changing text. How can I get the script to work without the <!--why do I need this--> line? or Can I get divXXX not to display? I've got style="display:none" but it still shows! The number of select options and divs will vary with database content. Could the java script be written before I have the results of the database query? I guess I'd have to pass it both the total number of options and which option to display? Thanks for your time. <html> <head> <script type="text/javascript"> function checker(what){ document.getElementById("divSCO0").style.display = "none"; document.getElementById("divSCO1").style.display = "none"; document.getElementById("divSCO2").style.display = "none"; if (what==1) { document.getElementById("divSCO1").style.display = "block"; }else if (what==2) { document.getElementById("divSCO2").style.display = "block"; }else { document.getElementById("divSCO0").style.display = "block"; } } </script> </head> <body> Select <select name="DDselect" onchange="checker(this.value)"><option value="0" selected></option> <option value="1">1</option> <option value="2">2</option> <br><br> <div id="divXXX" style="display:none"><textarea name="XXX" id="XXX" rows="0" cols="0"></textarea></div><!--why do I need this--> <div id="divSCO0" style="display:block"><textarea name="SCO0" id="SCO0" rows="2" cols="30"></textarea></div> <div id="divSCO1" style="display:none"><textarea name="SCO1" id="SCO1" rows="2" cols="30">Selection one from the dropdown</textarea></div> <div id="divSCO2" style="display:none"><textarea name="SCO2" id="SCO2" rows="2" cols="30">Two selected</textarea></div> </body> </html>
  9. Thanks Fenway, that's just what I'm looking for.
  10. I don't have the language to make the question obvious. I need the rows grouped on probe number and the groups ordered by the lowest pvalue in each group. The lowest pvalue in the data set is c 3 0.0001 so I want all the probe 3's first. Having used the probe 3's, the lowest pvalue in the set is now... a 1 0.001 so I want all the probe 1's next. And if I'd used "WHERE pvalue<0.08" I'd get all the probe 2's next. (Within group ordering on pvalue would be nice but it's secondary to getting the groups in the right order) I found a page in the manual about Create Procedure or Function. Maybe that's the way to go. I'll go do some reading.
  11. Thanks, I think that gives me the probe 1 group first, but I need probe 3 first because that group contains the lowest pvalue in the whole data set. If you imagine all these rows chucked in a pile I want to take from the pile the row with the lowest pvlaue, then take all the other rows with the same probe id, then from what's left take the lowest pvalue again, etc. If it's possible?
  12. Hi Can some one tell me if this is possible in a single query and if so how would I go about it? If I've got a table like... experiment probe pvalue a 1 0.001 a 2 0.7 a 3 0.01 b 1 0.7 b 2 0.7 b 3 0.0002 c 1 0.7 c 2 0.7 c 3 0.0001 and I want results like... experiment probe pvalue c 3 0.0001 b 3 0.0002 a 3 0.01 a 1 0.001 b 1 0.7 c 1 0.7 I can do this in two steps by... SELECT distinct(probe) FROM TABLE WHERE pvalue<0.05 order by pvalue; then using php to loop through the results ... SELECT * FROM TABLE WHERE probe='<each results from above query>' order by pvalue but it's very slow. I'll try and put it in words as 'I want all the rows for those probes which had a pvalue<0.05 in any experiment and I want the results grouped by probe and ordered by the lowest pvalue of each group of probes'. I can't even think of a search term that might help me solve this so any hints would be appreciated. Thanks MySQL Server version: 5.0.77
  13. Doh! I forgot to put session_start(); at the beginning of test1.php. Sorry to have bothered you.
  14. rhodesa I want to post variables from a form to 'test1.php' via your script. I thought I'd set the variables as session cookies at the start of your script but there are no session cookies when test1.php runs. It's probably the wrong approach anyway can you advise on the correct way to do this? Thanks My version of your script which reports that session cookies but test1.php doesn't <? session_start(); // Start Session session_register('analysis'); $_SESSION['analysis'] = $_REQUEST['analysis']; session_register('query'); $_SESSION['query'] = $_REQUEST['query']; ?> <html> <head> <title>Testing Javascript</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript"> $(function(){ //This code will run once the DOM is done loading setInterval("$('#time').load('test1.php');",1000); }); </script> </head> <body> <div id="time" style="border: 1px black solid; width: 750px;"></div> <? echo $_SESSION['analysis']." analysis<br>"; echo $_SESSION['query']." query<br>"; ?> </body> </html>
  15. Thanks Barand. Don't think I asked the question very well and I probably should have asked under php. What I was after is the array_keys function which gives an array of the column names from a query. My code now looks like... $sql = mysql_query($query); $columns= array_keys(mysql_fetch_array($sql, MYSQL_ASSOC)); $sql = mysql_query($query); while($row = mysql_fetch_array($sql, MYSQL_BOTH)){ //work out which field matched and print that field for ($i=1; $i<sizeof($row); $i++) { if (preg_match('/'.$_REQUEST['search_key'].'/', $row[$i])){ $row[$i]=preg_replace('/'.$_REQUEST['search_key'].'/', '<b>'.$_REQUEST['search_key'].'</b>', $row[$i]); #make the search term bold echo $columns[$i]." ".$row[$i]."<br>"; } } } NOTE: if you're joining tables and those tables have columns with the same name (I had edit_date columns in two tables) the array_keys function will only give you the first instance of the name so the $columns array and the $row array end up different lengths.
  16. I may not fully understand your problem from the description you gave but maybe a sub query is what you're after? select cardtagid from cardtags where tagid='C'; Should give you a result of 5,6,7,8,9,13. So a query for all tagid's that have a cardtag in the list 5,6,7,8,9,13 would be something like... Select distinct(tagid) from cardtags where cardtagid in (select cardtagid from cardtags where tagid='C'); which should give you A, B, C, D. Then to get rid of the tagid you used as a parameter, in this case C, add and tagid!='C' to the query... Select distinct(tagid) from cardtags where cardtagid in (select cardtagid from cardtags where tagid='C') add and tagid!='C'; Hope that helps.
  17. Hi I'm working on a 'quick', 'key word' based search for my database. Say the key word is 'pool' and the sql search returns an array like... id : image_desc : location : photographer 2 : mountain pool : lake district : Mr Swan 8 : tower ballroom : blackpool : Mrs Pen 9 : beach ball : skegness : James Pool The code below will print... 2 mountain pool 8 blackpool 9 James Pool What I'd like is... 2 mountain pool (image_desc) 8 blackpool (location) 9 James Pool (photographer) I can do this by creating an array of all my column names and using $i to pull out the relative column id but is there a better way to do it? I'm using MYSQL_BOTH so I already have the column name information I just don't know how to get at it. Thanks for your time. Ann while($row = mysql_fetch_array($sql, MYSQL_BOTH)){ //work out which field matched and print that field for ($i=1; $i<sizeof($row); $i++) { if (preg_match('/'.$_REQUEST['search_key'].'/', $row[$i])){ $row[$i]=preg_replace('/'.$_REQUEST['search_key'].'/', '<b>'.$_REQUEST['search_key'].'</b>', $row[$i]); #make the search term bold echo $row[0]." ".$row[$i]."<br>"; } } }
  18. Hi I want to reconfigure php --with-mysql. I thought this would be as simple as take the configure command from the phpinfo() page and run it from the php installation dir changing the --without to --with for mysql. But, (isn't there always a but?) I'm running php-5.2.2 and I can only find install directories for php-4.3.7 and php-5.0.1. Does anyone know why I appear to be using a different version to the ones installed? As I haven't got a /usr/software/apache/php-5.2.2/configure file how do I reconfigure for mysql? Cheers Ann OS: FC7 and a new install of about a month ago so I've no idea why I have two (or is it three) php versions. [root@localhost]# which php /usr/bin/php [root@localhost]# /usr/bin/php -v PHP 5.2.2 (cli) (built: May 8 2007 08:15:05) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies [root@localhost]# locate php-5.2 [root@localhost]# [root@localhost]# locate php | grep configure /usr/software/apache/php-4.3.7/configure /usr/software/apache/php-4.3.7/configure.in /usr/software/apache/php-4.3.7/TSRM/configure.in /usr/software/apache/php-4.3.7/Zend/configure.in /usr/software/apache/php-4.3.7/ext/bcmath/libbcmath/configure /usr/software/apache/php-4.3.7/ext/bcmath/libbcmath/configure.in /usr/software/apache/php-4.3.7/ext/libpng/configure /usr/software/apache/php-4.3.7/ext/mbstring/libmbfl/configure.in /usr/software/apache/php-5.0.1/configure /usr/software/apache/php-5.0.1/configure.in /usr/software/apache/php-5.0.1/TSRM/configure.in /usr/software/apache/php-5.0.1/Zend/configure.in /usr/software/apache/php-5.0.1/ext/bcmath/libbcmath/configure /usr/software/apache/php-5.0.1/ext/bcmath/libbcmath/configure.in /usr/software/apache/php-5.0.1/ext/mbstring/libmbfl/configure.in /usr/software/apache/php-5.0.1/win32/build/configure.tail [root@localhost]# The start of my phpinfo()... PHP Version 5.2.2 System Linux localhost.localdomain 2.6.21-1.3194.fc7 #1 SMP Wed May 23 22:35:01 EDT 2007 i686 Build Date May 8 2007 08:15:45 Configure Command './configure' '--build=i386-koji-linux-gnu' '--host=i386-koji-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--disable-json' Server API Apache 2.0 Handler Virtual Directory Support disabled Configuration File (php.ini) Path /etc Loaded Configuration File /etc/php.ini Scan this dir for additional .ini files /etc/php.d additional .ini files parsed /etc/php.d/json.ini, /etc/php.d/ldap.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/zip.ini PHP API 20041225 PHP Extension 20060613 Zend Extension 220060519 Debug Build no Thread Safety disabled Zend Memory Manager enabled IPv6 Support enabled Registered PHP Streams php, file, data, http, ftp, compress.bzip2, compress.zlib, https, ftps, zip Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*
  19. Thanks btherl. It was indeed the wonder that is SELinux. When you've got it properly disabled you get... [root@xyala html]# /usr/sbin/sestatus | grep SELinux SELinux status: disabled ... as I'm a dinosaur who can see no purpose for it other than wasting my time, I won't be enabling it again.
  20. This is going to be an SELinux issue! I thought I had SELinux turned off but I've just been trying to check and I think it's running in permissive mode. [root@xyala ~]# /usr/sbin/sestatus | grep SELinux SELinux status: enabled SELinuxfs mount: /selinux [root@xyala ~]# /usr/sbin/sestatus | grep mode Current mode: permissive I'm not sure that means it's in permissive mode but I can't get in front of the box to check what I set in the GUI. I've edited /etc/selinux/config to disable it fully but that needs a reboot to take effect and I can't reboot just at the moment. I'll let you know if it starts working (then again you'll probably hear me screaming about SELinux )
  21. Thanks, I never knew there was such a thing. I didn't compile a local version because I seem to already have it so tell me if I should have. I wrote this little bit of php <?php $dbconn=pg_connect("dbname=lumbribase"); if ( ! $dbconn ) { echo "Error connecting to the database !<br> " ; printf("%s", pg_errormessage( $dbconn ) ); exit(); } else {echo "connected", "\n";} $sqlcom="select * from lib"; $dbres = pg_exec($dbconn, $sqlcom ); if ( ! $dbres ) { echo "Error : " + pg_errormessage( $dbconn ); exit(); } $do = pg_Fetch_Object($dbres, 2); $name=$do->name; echo "and the name is... $name\n"; ?> and ran it [ann@xyala tmp]$ php test.php connected and the name is... Juvenile Earthworm Library (I only made it go and get "Juvenile Earthworm Library" because I didn't believe the "connected") ">which php" say's I'm using /usr/bin/php on the command line and I think the configure command details on here http://xyala.cap.ed.ac.uk/php_info.php means the web pages use the same php. Is there a difference in how the command line and web interfaces connect?
  22. Can anyone explain what going wrong here? I'm at a loss and the postgres mailing list hasn't come up with and answer. Any sugestions for a fix or how to debug this would be greatly appreciated. The message in the error_log is... The PHP code is... $dbconn=pg_connect( "dbname=lumbribase host=localhost port=5432 user=webuser" ); $dbconn=pg_connect(dbname=$PG_DATABASE); if ( ! $dbconn ) { echo "Error connecting to the database !<br> " ; printf("%s", pg_errormessage( $dbconn ) ); exit(); } According to the postgres guy's "psql -h localhost lumbribase" means force postgres to use a TCP connection when making a local connection to postgres and that works fine. Perl scripts using DBD_PG connect fine. Why is postgres denying permission to connections made through PHP? It's not user or database specific. It would need to connect to the postgres server to check a users permissions but it's not getting that far. This bit's I know are... http://xyala.cap.ed.ac.uk/php_info.php say's php's configured for pgsql the port is accepting TCP [#@xyala]# telnet localhost 5432 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. Connection closed by foreign host. [#@xyala]# pg_hba.conf is currently set up to allow anyone in [#@xyala]# less /var/lib/pgsql/data/pg_hba.conf # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust postgres.conf is set to listen on all ports [#@xyala]# grep 'listen' /var/lib/pgsql/data/postgresql.conf # "pg_ctl reload". Some settings, such as listen_address, require #listen_addresses = 'localhost' # what IP interface(s) to listen on; listen_addresses = '*' [#@xyala]# don't know what should be in this file but I can't think I've ever had to change it before. [#@xyala]# less /etc/php.d/pgsql.ini ; Enable pgsql extension module extension=pgsql.so the server I'm going to replace is running the same versions of PHP and postgres http://zeldia.cap.ed.ac.uk/php_info.php The /etc/php.ini files on the two machines are the same and the /var/lib/pgsql/data/postgresql.conf files are only different because I've set listen_addresses = '*' on the new server (xyala) to see if I can make it work.
  23. Hi Does anyone know of a way to get this <a href="http://trichuris.cap.ed.ac.uk/tmp/required.jpg">screenshot</a> type of display in all browsers. My curret set up (<a href="http://zeldia.cap.ed.ac.uk/clade_test.shtml">here</a>) uses a background image in a table and it's great in firefox if you don't change the size of the text but what good's that... So is there another way to tackle the problem; showing the relations between checkboxes (drawing the lines) relative to where the browser positions the checkboxes? Something like an image map but I don't think you can have checkboxes with them. Any advice/sugestions appreciated Thanks
  24. OK I got it. $ref=$_SERVER['DOCUMENT_NAME']; :)
  25. Hi What I want is to be able to include a php file in an shtml doc and have a function in the php (like $_SERVER['PHP_SELF']) which will report the name of the shtml. e.g. if <b>test.shtml</b> calls species_db_queries.php like this       <!--#include virtual="species_db_queries.php" --> then species_db_queries.php prints $_SERVER['PHP_SELF'] like ...     $ref=$_SERVER['PHP_SELF'];     print "$ref"; I get "<b>species_db_queries.php</b>" printed when what I'm after is <b>test.shtml</b>. But similar code using test.php instead of test.shtnl gives me what I want. e.g. e.g. if <b>test.php</b> calls species_db_queries.php like this     <? include ("species_db_queries.php"); ?> then species_db_queries.php prints $_SERVER['PHP_SELF'] like ...     $ref=$_SERVER['PHP_SELF'];     print "$ref"; I get "<b>test.php</b>" printed. So can I get the required result and keep my shtml files as shtml? Thanks for your time Ann
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.