Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

otuatail's Achievements

Advanced Member

Advanced Member (4/5)




Community Answers

  1. Hi. I have a database table with one field having a string comment field. I need to replace the '£'£ with &pound but I have tried this $Comment = $row['Comment']; $Comment = str_replace( $Comment, "£","£"); This just replaces the $Comment with a single character '£' If the string says "I have a £ in my pocket" it should be replaced with "I have a &pound in my pocket" TIA
  2. Thanks that works but when I inspect table I have tinyint(3) Why 3?
  3. Sorry but can't get this table creation to work. Any help? DROP TABLE IF EXISTS `config`; CREATE TABLE IF NOT EXISTS `config` ( `EntryDate` date DEFAULT NULL, `BalanceValue` decimal(6,2) NOT NULL DEFAULT '0.00', `Mode` unsigned tinyint NOT NULL DEFAULT 0 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  4. Hi. I have a web page that allows a comment field where any charecter can be entered including ' " and £. I enter this into a database `Comment` varchar(32) NOT NULL DEFAULT '', When this is displayed sometimes the pound symbol is displayed as a black demimonde with a question mark. It has a ascii value of 0. How can I fix this? I enter it into the database as Comment = str_replace ( "£", "£", $Comment ) ; This doesn't fix it. It works fine when i enter it into the DB as \' and \". TIA Desmond.
  5. Sorry guys. Session start was missing. Always the obvious ones.
  6. Hi I have a web page that refreshes every 2 seconds for testing purpose. I want to write to a unique file each time I run the web page test. I have this if (!isset($_SESSION['current_file'])) { $file_name = "2-" . time() . ".txt"; $_SESSION['current_file'] = $file_name; } When I echo this file na,e out it changes on each page refresh, but the session should be set after the first instance of the page.
  7. Ok Thanks. I don't always use use the full <?php ?> and things have worked. It does work now. Sudenly realised. I normaly use <?php at the top of my pages. Left it out this time so it must have got confused.
  8. functions.php function readconfig() { $sqlReadConfig = "SELECT * FROM whatadrama_config"; $qReadConfig = mysql_query($sqlReadConfig) or die ("E201-100A"); $rs = mysql_fetch_array($qReadConfig) or die ("E201-100B"); //echo $rs[0] . " - " . $rs[1] . " - " . $rs[2] . " - " . $rs[3]; // *** This works fine *** //exit; return $rs; } webpage.php <? $rs = readconfig(); echo $rs[0]; ?> I can read the contents of a table in my functions file but when I comment out the reading code and return $rs; I can't read it in the main web page.
  9. Okay all inner div's are now float left! Doesn't look right. What was the a clear:left all about?
  10. I have given the first of each row a clear:left but this has made it worse. http://whatadrama.de...dmin/config.php
  11. Hi I have an outer div and inside I want to have 2 rows of 3 div's. I have made 2 float left and the third (one on the end) clear. How can I have rows of 3 div's each? TIA Desmond. http://whatadrama.desmond-otoole.co.uk/MyAdmin/config.php
  12. otuatail


    Ok so there is a solution?
  13. otuatail


    Hi, I want to align text within a text input box. Seems this only works within a style"text-align:right" statement but not within the <input> statement. <div style="width:450px;height:230px;padding:10px;"> <div style="width:240px;height:30px;float:left;"> <div style="width:440px;float:left;">Entry Date: <input style="text-align:right;" type="text" size="1" maxlength="2" name="DD_Entry" value="<?=$SE_DD_Entry?>"> / <input style="text-align:right;" type="text" size="1" maxlength="2" name="MM_Entry" value="<?=$SE_MM_Entry?>"> / <input style="text-align:right;" type="text" size="2" maxlength="4" name="YYYY_Entry" value="<?=$SE_YYYY_Entry?>"> <span style="color:red;"><?=$_SESSION['Error_5']?></span></div> </div> This doesn't work <div style="width:220px;height:30px;float:left;clear:both">Money in: £ <input type="text" maxlength="10" size="5" name="MoneyIn" text-align="right" value="<?=$SE_Money_In?>" size="8"> <span style="color:red;"><?=$_SESSION['Error_6']?></span></div> <div style="width:220px;height:30px;float:left;clear:both">Money Out: £ <input type="text" maxlength="10" size="5" name="MoneyOut" text-align="right" value="<?=$SE_Money_Out?>" size="8"> <span style="color:red;"><?=$_SESSION['Error_7']?></span></div>
  14. Wow you could have fun with that. Especialy to get you up the search engine rankings.
  • 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.