ToonMariner
Members-
Posts
3,342 -
Joined
-
Last visited
Everything posted by ToonMariner
-
php just creates html (amongsth a couple of hundred other things it can do) - what html it creates is enitrely up to you. so all you ned to do is put the <link rel .... /> in.
-
well ie 6 has no problems using hover on the a tag - if so then something is wrong with the css that prevents it functioning.
-
css needs some kind of element to make the selector or class/id inorder to act on anything. If you are absolutley positive there is nothing like a span around the word then it is javascript doing the job. to check switch js or css off and see what happens.
-
color should be lowercase... but why not give the table a class (or id) and do this... table.tclass td { color: black; position:relative; } that will save you lots of typing class="xxx" in your html
-
Hmmmm. I am no server dude BUT if you are using a separate server(s) as long as they are in teh same cluster you shoudl be able to do a bit of magic with either the OS or apachy to prevent you from having to do too much work. Like I said I am not a network fiend but I am absolutley positive it can be done using a cluster... Perhaps a post on the apachy foru will help (Certain this is something more than apachy but there will be network/server dudes in there with the answer).
-
ie 6 only handles :hover on the a tag. you need some js to get other elements to play ball.
-
looks fine in ie6 7 , ff 2 opera 9
-
the src has to be relative to the client machine... If this an intranet site then every computer would need that drive mapped AND each would have to tag the drive as 'Z'. You solution is to temporarily copy the files to the main server or grab the file contents as a string and echo that via the <img src="/image.php?file=path/to/file" ... method. Image.php would be the script that grabs the file and reads it into a string and all you need then is echo that string.
-
what you need is md5 or sha1 (the latter being my prefered option); beaten to it because of coffe in one hand grrrr
-
As others have rightly pointed out - php can't detect if javascript is enabled or not. What you can do though (if you are ok with the banner only showing on any page AFTER the firts page the user visits) use javascript to add a variable to the end of each link OR alter the value of any submit buttons - in the processing script you could look fro these - if they are present then js 'is' on. (I say 'is' as someone could put this in themselves but theyed have to really want to...)
-
You mean $_SESSION['user_id']? No that is the correct way to reference an string index... if you would use $_SESSION[user_id] then may I suggest you change - its all about code style, consitency and support. In future the php engine may refuse to recognize the non-quote method...
-
[SOLVED] Problem assigning a value to a Session Variable.
ToonMariner replied to Solarpitch's topic in PHP Coding Help
the 'select count(*)' is your problem change your code to this... <?php //Connect and stuff.... $query = "select * from members where username = '$nme' and user_password = '".md5($pass)."'"; $result = mysqli_query( $mysql, $query ) or die('Cannot run query.'); if ( @mysql_num_rows($result) > 0 ) { $row = mysqli_fetch_assoc( $result ); $_SESSION['user_id'] = $row['id']; header("Location:upload.php"); ob_end_flush(); } ?> -
Hi all, Since this is the misc section....... My Buddy is marketing MAnager at Durham University and asked if I knew of (which I don't other than accessibility orgs) of high profile companies that will audit a website and delivery reports on the how effective the structure, technology used and search ability (both externally - google et al and internally - site search function) are. He needs to gauge the effectiveness of the site for some reason. Any pointers would be great. I think they would like an institution that don't do web design themselves but obviously they would use a design agency if no there option were available... Many thanks.
-
resize window and center in the middel of the page
ToonMariner replied to HAVOCWIZARD's topic in HTML Help
http://www.javascript-coder.com/window-popup/javascript-window-open.phtml -
Hi, Posting this in here as the query itself is ok but.... OK I have this query.... $qry = ' SELECT `t`.* , `s`.`service_name` FROM `tips` AS `t` , `services` AS `s` , `customers` AS `c` WHERE `t`.`service_id` = `s`.`service_id` AND `c`.`user_id` = ' . $_SESSION['user_id'] . ' AND `t`.`tip_date` < DATE_ADD(`c`.`startdate`, INTERVAL 90 DAY) AND `t`.`result` IS NULL ORDER BY `t`.`tip_date` DESC '; echo $qry; $qry = mysql_query($qry) or die(mysql_error()); If I run the query directly in phpmyadmin (with session['user_id'] as a value) it returns the results as expected. Running the self same query through php I get this You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 13 I am running this locally - php 4.4.4 mysql 4.1.21. Can anyone suggest why this error is reported when the query is fine in phpmyadmin??? Many thanks.
-
err - what I posted will do what you asked in the OP (with the proper form tags and submits buttons etc.). I am a little confused at why you need to add fields to your database - I suspect what you want to do is add a new record but you will have to assess your table structure and see how you can maintain a set number of fields and simply differetiate on field value.
-
<?php while(...) { ?> <input type="checkbox" name="tt_reg_int_check[]" value="<?php print $request['tt_product_group_id'];?>"> <?php } ?> processing code <?php $qry = "SHOW COLUMNS FROM `tt_product`" $qry = mysql_query($qry); while($row = mysql_fetch_assoc($qry)) { $fields[] = $row['Field']; } $alter = NULL; foreach($_POST['tt_reg_int_check'] as $key => $val) { if (!array_keys($fields,$val)) { $alter .= "ADD `tt_reg_int_check_[" . $val . "]` SMALLINT(3) DEFAULT '1' NOT NULL ," } } if (!is_null($alter)) { $alter = substr($alter,0, strlen($alter) - 1); $qry = "ALTER TABLE" . $alter; } ?>
-
Thanks but no luck - think I may have to put a ticket in on server admin....
-
I have this code if ( strcmp(substr($_SERVER['DOCUMENT_ROOT'],-1,1),'/') == 0 ) { include_once($_SERVER['DOCUMENT_ROOT'] . 'config.php'); } else { include_once($_SERVER['DOCUMENT_ROOT'] . '/config.php'); } $error = NULL; $user = $_GET['user']; $filename = $user . $_GET['file']; //echo $filename; if ( ini_get('zlib.output_compression') ) { ini_set('zlib.output_compression', 'Off'); } $file_extension = explode('.',$filename); $pos = count($file_extension) - 1; //echo $pos; $file_extension = $file_extension[$pos]; //echo $file_extension; if ( is_null($filename) ) { $erro = "Error: No file path passed to script."; echo $erro; exit; } /* else { $first_char = substr($filename,0,1); if ( $first_char == "/" ) { $filename = substr(strtolower($filename), 1); } if ( !file_exists($_SERVER['DOCUMENT_ROOT'] . $filename) ) { $error = "Error: No such file found."; echo $erro; exit; } }*/ switch ($file_extension) { case "pdf": $ctype = "application/pdf"; break; case "exe": case "mp3": $ctype = "application/octet-stream"; break; case "zip": $ctype = "application/zip"; break; case "doc": $ctype = "application/msword"; break; case "xls": $ctype = "application/vnd.ms-excel"; break; case "ppt": $ctype = "application/vnd.ms-powerpoint"; break; case "gif": $ctype = "image/gif"; break; case "png": $ctype = "image/png"; break; case "mp3": $ctype = "audio/mp3"; break; case "mpg": case "mpeg": $ctype = "video/mpeg"; break; case "mp4": $ctype = "video/mp4"; break; case "jpeg": case "jpg": $ctype = "image/jpg"; break; default: exit(); } header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: private',false); header('Content-Type: ' . $ctype); header('Content-Disposition: attachment; filename="' . basename($filename) . '";' ); header('Content-Transfer-Encoding: binary'); header('Content-Length: ' . filesize($filename)); readfile($filename); exit(); ?> Which I pass the correct parameters through to download a file. The file download is successful BUT when trying to play the file I get this from media player... The file you are attemping to play has an extension (.mp3) that does not match the file format.... Can anybody suggest why this is so? I have removed id3 tags from the mp3 files etc etc and still no joy...
-
5 - its OOP support is vastly superior to 4. 4 is probably a far more common installation but hopefully this will change in teh not too distant.
-
what you have to do is make it work in as many clients as poss... I would advise that you go for a width of about 550px wide and use the horrible old table layout. Don't put any style attributes for background images - use teh backgroundimage attribute for the td instead. HTML email support is not very good so you hav to go for the lowest common denominator.
-
I love you all. PS don't normally get that far down a page in the manual - shall endeavour to make amends...
-
you have a height setting on the outer most table. That is just html spaghetti - I found that pretty quick because it was near the top and my ff css viewer wasa in full force. Far too mcuh html to achieve the outcome and far too messy to manage - good luck.
-
If you are scripting this your self then this tut is pretty useful - http://www.phpfreaks.com/tutorials/151/0.php
-
I have a 2d array '$arr'. I copy the array... $arr2 = $arr; and then apply the array_mulisort to $tarr2. The result is that $arr2 is sorted as desired BUT $arr is now also sorted to the same specification as $arr2!!! What is going on - what am I missing... $arr2 = $arr; array_multisort ( $arr2['tip_date'] , SORT_ASC, SORT_STRING , $arr2['service_name'] , SORT_ASC, SORT_STRING , $arr2['service_id'] , SORT_ASC, SORT_NUMERIC , $arr2['tip_id'] , SORT_ASC, SORT_NUMERIC , $arr2['tip_point'] , SORT_ASC, SORT_NUMERIC , $arr2['tip_odds'] , SORT_ASC, SORT_NUMERIC , $arr2['result'] , SORT_ASC, SORT_STRING , $arr2['tip_text'] , SORT_ASC, SORT_STRING ); I am not sorting any other arrays anywhere else in the script and this code is in the main body of script not a function... Many thanks to the individual who points out where I am going wrong.