Jump to content

otuatail

Members
  • Posts

    961
  • Joined

  • Last visited

Everything posted by otuatail

  1. $sql = "SELECT current FROM LIBusersX WHERE UserKey = '$Key' AND K_Type = $type AND current > 0 "; // echo $sql . "<br>"; $query = mysql_query ($sql) or die ("E112-100A"); $total = mysql_num_rows($query) or die ("E112-101A"); Hi I have a website with a few users. I set up a system so that some users (as a trial) can only log on a fixed number of times. I have a field called current that counts down to zero. However when it reaches zero I get my error E112-101A Why do I get an error? Surely I should just get $total = 0
  2. Hi I am not wet behind the ears with web design so constructive ideas only please. target=blank is ok for most people. Using internet explorer 11, If I use it creates a new tab in the browser but some like the BBC < a UK company> open up an internet on line listening service for anyone in the world, PROBLEM. This does not open up as an extra tab in IE it opens up a totally separate windows/browser window. Can I do this even if it is a pop up help. Preferably taking data session variables etc with it Hope this makes sense. Nice replies appreciated. Desmond
  3. <?php // Library SMS3S Version 1.0.0 15-03-2014 include ("../secure/SecureFunctions.php"); session_start(); Session_Init(); $name1= "O'Brian"; // Match O' if second character is (') $name2 = "Robinson"; $myReg = "/(O')[A-Za-z]{12} | [A-Za-z]{14}/"; if(preg_match($myReg, $name1)) echo "Yes"; else echo "No"; echo "<br><br>"; if(preg_match($myReg, $name2)) echo "Yes"; else echo "No"; ?> I am trying to put together a simple surname match with a slight difference. Any help on RexX?
  4. otuatail

    Float left

    In desperation I have had to add <br><br> to the ends of the first 2 lines. This is crazy.
  5. Is this all you are trying to do? <img src="images/me.jpg" alt="my picture" width="300px"> This would make the width the same but the aspect ratio of the photos would affect the height and not all digital cameras have the same 1:1.5 ratio
  6. otuatail

    Float left

    <div style="width:220px;height:75px;"> <div style="width:80px;height:25px;float:left;">KeyAsk</div><div style="width:40px;float:left;"><input type="text" name="Ask" style="width:30px" maxlength="2" value="<?=$rs['KeyAsk']?>"></div><div style="width:100px;color:red;float:left;">Invalid</div> <div style="width:80px;height:25px;float:left;">KeyChange</div><div style="width:40px;float:left;"><input type="text" name="Change" style="width:30px" maxlength="2" value="<?=$rs['KeyChange']?>"></div><div style="width:100px;color:red;float:left;">Invalid</div> <div style="width:80px;height:25px;float:left;">current</div><div style="width:40px;float:left;"><input type="text" name="current" style="width:30px" maxlength="2" value="<?=$rs['current']?>"></div><div style="width:100px;color:red;float:left;">Invalid</div> Hi I have done the maths and it does appear to add up. I had an outer div and inside 3 rows of 2 dives float left. This worked fine until I added a 3rd column to the rows Now the first div of the second row is directly under the last element (Invalid) not returning to the left side of the outer container. Outer container width is 200px and each row of 3 is 80px, 40px, 100px. No border solids to mess it up. Help please TIA Desmond.
  7. INSERT INTO `Shelves` VALUES (0, '03c2e7e41ffc181a4e84080b4710e81e', 'New'), (1, 'a39e9eea66930fe0050d56a28bafab72', 'Desmond'), (2, '70965feb0441ff7fc1982fc5c509136e', 'Malawi'), (3, 'ee60398b064d0ef982e2a9d91fd9ada8', 'YBC'), (4, '0153a1e369e543364edb1e75ceff1173', 'Recipes'), (5, 'f84d329354422000da05b9bc8fe60301', 'Ark Church'), (6, 'f99d5fd996456751e77abb893110aaeb', 'YBC2'); I am using the MD5() value instead of ID I didn't want to use the auto numbering of a table as a precaution. If there was a crash on a web page or a hacker got the name of a table then an ID of 1,2,3,4,5 would be a prise to him. I replace this with an md5() of data so there is no sequence. Having said that if I do an sql query SELECT * from Users where Surname = 'Smith' I could have 5 records with IDs that are not consecutive. What I wanted to do was give the checkbox's a name of the record ID like <input type="checkbox" name ="<?=rs['ID']" ... But when I submit the form to another page I will not know the names of each checkbox and that was the problem. Does this help. This is a sample table
  8. <div style="width:1500px;height:20px;"> <div style="width:20px;height:12px;float:left;"><input type="checkbox" name="03c2e7e41ffc181a4e84080b4710e81e"></div> <div style="width:90px;height:12px;float:left;"><a href="UserShelvesUpdate.php?ID=03c2e7e41ffc181a4e84080b4710e81e">New</a></div> </div> <div style="width:1500px;height:20px;"> <div style="width:20px;height:12px;float:left;"><input type="checkbox" name="a39e9eea66930fe0050d56a28bafab72"></div> <div style="width:90px;height:12px;float:left;"><a href="UserShelvesUpdate.php?ID=a39e9eea66930fe0050d56a28bafab72">Desmond</a></div> </div> <div style="width:1500px;height:20px;"> <div style="width:20px;height:12px;float:left;"><input type="checkbox" name="70965feb0441ff7fc1982fc5c509136e"></div> <div style="width:90px;height:12px;float:left;"><a href="UserShelvesUpdate.php?ID=70965feb0441ff7fc1982fc5c509136e">Malawi</a></div> </div> <div style="width:1500px;height:20px;"> <div style="width:20px;height:12px;float:left;"><input type="checkbox" name="ee60398b064d0ef982e2a9d91fd9ada8"></div> <div style="width:90px;height:12px;float:left;"><a href="UserShelvesUpdate.php?ID=ee60398b064d0ef982e2a9d91fd9ada8">YBC</a></div> </div> <div style="width:1500px;height:20px;"> <div style="width:20px;height:12px;float:left;"><input type="checkbox" name="0153a1e369e543364edb1e75ceff1173"></div> <div style="width:90px;height:12px;float:left;"><a href="UserShelvesUpdate.php?ID=0153a1e369e543364edb1e75ceff1173">Recipes</a></div> </div> <div style="width:1500px;height:20px;"> <div style="width:20px;height:12px;float:left;"><input type="checkbox" name="f84d329354422000da05b9bc8fe60301"></div> <div style="width:90px;height:12px;float:left;"><a href="UserShelvesUpdate.php?ID=f84d329354422000da05b9bc8fe60301">Ark Church</a></div> </div> <div style="width:1500px;height:20px;"> <div style="width:20px;height:12px;float:left;"><input type="checkbox" name="f99d5fd996456751e77abb893110aaeb"></div> <div style="width:90px;height:12px;float:left;"><a href="UserShelvesUpdate.php?ID=f99d5fd996456751e77abb893110aaeb">YBC2</a></div> </div> Hi. This is not as simple as it sounds. I have a table with an ID table with an integer ID. For security reasons I do not want to use this value so I have a table field of MD5() values. As I do not know what the result set will show. I need to retrieve the IDs of all the check boxes in the background form (pure php code)when I submit it. This is what I have when I view source on a page with check boxes. As you can see there is no actual order numbering of the check boxes. Is this achievable by checking any check boxes names and values on the submit form?
  9. Ok this is Miscellaneous section. I am getting an android tablet and thought that as a PC developer I could have fun writting this. I have downloaded the software. What I need is a suitable forum for this. Can't find this in the listings. Any ideas guys. TIA Desmond.
  10. Sorry guys. I am totally baffled this. I have had problems in the past with website cashing. The same URL failed in firefox and I was tearing my hair out. 3 hours later after a re-boot it is working which is why you could not find a problem. I am not a wiz kid but this was the stupidest thing I ever heard of. Sorry for the inconvenience. If in doubt, kick the computer Desmond.
  11. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Street Angel Create</title> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META http-equiv="imagetoolbar" CONTENT="no"> <meta http-equiv="refresh" content="120"> <LINK rel="stylesheet" href="stylesheets/SM3S.css" type="text/css"> </head> <body> <div id="PageTitle"></div> <div id=thebody> <div id=margin></div> <div id="PageContent"> <h2>Nat West Credit Card Fraud</h2> <form action=""> <div class="MyText"><br>These are the recordings from Nat West Insolvency department. The full recording is 52 minutes long with 20 minutes on hold Listening to boring music.<br>I am showing the last 22 minutes where Helen is informing me that they have computer records of my DRO on the 27th November 2009.<br>This contradicts a letter I was initially sent from Nat west dated 9th October 2012 stating that they had no record of my DRO.<br><br></div> <div><a href="Recording1.mp3">Nat west 22 minutes</a><br><br></div> <div class="MyText">This second recording is from the insolvency/Official receivers office<br>In this recording I am reliably informed that They contacted Nat West as well as all other creditors on the 27th November 2009.<br>I am also informed that they have no record of Nat Wes contacting them around October 2012 or at any other time. They only have records of my contacting them<br><br>If you read the letter from Nat west dated 9th October then it is clearly FULL of lies.<br><br></div> <div><a href="Recording2.mp3">Official receiver 13 minutes</a><br><br></div> <div class="MyText">What they have done is criminal and to use the joke. If you get an infinite number of monkeys they will write all the great works but they all work for Nat West.<br>There is a lot to listen to here so you might want to get a large box of pop corn. I will be unavailable today from 10:50am - 12:30pm You can right click and download if you wish. Enjoy.<br></div> </form> </div> </div> </body> </html> * { padding: 0; margin: 0px; } body { font-family: Arial; font-size: 12px; color: #000000; } h1, h2, h3, h4, h5, h6 { color: #aa8800; } input[type="input"]:focus, input[type="password"]:focus, input[type="text"]:focus, textarea:focus { background:red; color:blue; Font:Bold; } a:link { color: #0000ff; text-decoration: underline; } /* aa8800 */ a:active { color: #0000ff; text-decoration: underline; } /* 0000ff */ a:visited { color: #0000ff; text-decoration: underline; } /* aa8800 */ a:hover { color: #ff0000; text-decoration: underline; /* background: #cccccc; */ } /* ff0000 */ .HiLight { color:blue; font-weight:bold; } .TableClass { border:2px solid black; border-collapse:collapse; /* cellpadding:10px; */ } #PageTitle { height:100px; width:1000px; background-color:blue; } #thebody { height:800px; width:1000px; } #margin { float:left; height:800px; width:10px; background-color:green; } #PageContent { float:left; padding-left:12px; } .MyText { color:blue; font-family: Arial; font-size: 12px; }
  12. Is it the valid email address you want? Someone has put a lot of work into doing this. I can dig it out if you want.
  13. Sorry guys but this does not work in firefox. Adding some extra words and it failes in IE8 also http://www.des-otoole.co.uk/nwcc/Files.php passes http://validator.w3.org and http://jigsaw.w3.org Confused
  14. I have a large user logon. I decided that as i hate having NULL values I made defaults. I modified the table together with 3 test users. I wanted NOW to test it by entering one record using the primary key. (there is no reference to other tables) Here is what I have minus the 3 rows inserted (This bit works fine). DROP TABLE IF EXISTS `SM3SusersX`; CREATE TABLE IF NOT EXISTS `SM3SusersX` ( `UserF` varchar(15) NOT NULL default '', `UserS` varchar(15) NOT NULL default '', `UserN` varchar(32) NOT NULL default '', `Friendly` varchar(15) NOT NULL default '', `Email` varchar(40) NOT NULL default '', `RollID` varchar(32) NOT NULL default '', `PageID` tinyint(4) NOT NULL default 0, `UserKey` varchar(32) NOT NULL default '', `K_Type` tinyint(4) NOT NULL default 0, `KeyDate` datetime default NULL, `Personal` varchar(32) NOT NULL default '', `P_Type` tinyint(4) NOT NULL default 0, `KeyAsk` tinyint(4) NOT NULL default 0, `KeyChange` tinyint(4) default 0, `User` varchar(32) NOT NULL default '', `cookieKey` varchar(32) NOT NULL default '', `current` tinyint(4) NOT NULL default 0, `Mobile` varchar(14) NOT NULL default '0', `SMS_Count` varchar(14) NOT NULL default '0', `Proposed` varchar(32) NOT NULL default '', `Second` varchar(32) NOT NULL default '', PRIMARY KEY (`User`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; NOW with 3 rows also added as part of the table creation I I should simply do this. INSERT INTO SM3SusersX User '3e06fa3927cbdf4e9d93ba4541acce86'; Error ... #1064 - 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 'User '3e06fa3927cbdf4e9d93ba4541acce86'' at line 1
  15. Hi I have a home page that works fine with a stile sheet http://www.des-otoole.co.uk/SM3S/index.php <LINK rel="stylesheet" href="stylesheets/SM3S.css" type="text/css"> I have created a sub folder Admin and copied it into their amending the path to the stlyle sheet http://www.des-otoole.co.uk/SM3S/Admin/temp.php <LINK rel="stylesheet" href="../stylesheets/SM3S.css" type="text/css"> The style sheet only half works in the Admin folder and I can't work out why Any help on this TIA Desmond.
  16. Hi I am puzzled of some css. I have a web page with 3 divs. A top banner and underneath a left margin which can be extended for side menus and a right div for the content. The left div has a float:left attribute. Margin and PageContent are wrapped by a thebody div. PageContent has a left padding of 12px but only looks like 2px. It seems it is using the left part of the page and not the div itself as a reference. URL: http://www.des-otoole.co.uk/SM3S #PageTitle { color:blue; height:100px; width:1000px; background-color:blue; } #thebody { height:800px; width:1000px; } #margin { float:left; height:800px; width:10px; background-color:green; } #PageContent { padding-left:12px; } Cant figure this out. TIA Desmond.
  17. Hi I want to check strings including case sensitive but I cant get it to work $Name = strtolower (trim(stripslashes($_POST['Name']))); $Pwd1 = strtolower (trim(stripslashes($_POST['PWD1']))); if($Name == "Abc" && $Pwd1 == "Xyz") { // } thi if statment works for Abc abc ABC Need it to be case sensitive Any ideas please Desmond.
  18. Hi I am trying to get 2 divs to float left next to each other inside a containing div. .container { border:solid; position:absolute; top:15px; left:20px; width:940px; height:650px; /* border-color:red; border-style:solid */ } .content { border:solid; float:left; padding:10px; width:300px; height:135px; color: #aa8800; /* border-color:red; border-style:solid */ } .content2 { border:solid; padding:10px; width:470px; height:135px; color: #aa8800; } code] [code] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Christian Views Home</title> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <META http-equiv="imagetoolbar" CONTENT="no"> <link rel="stylesheet" href="stylesheets/ChristianViews2.css" type="text/css"> </head> <body> <form action="submit.php" method="post"> <div class="container"> <div class="content">content<div> <div class="content2">content 2</div> </div> </form> </body> </html> Seems simple but this is crazy. TIA Desmond.
  19. Ok it is probably random generated and is used as a forgot password kind of thing. As for MD5 is not secure for storing passwords What I do is MD5() the password into the database and use that for every log in. It is not realy encription but will fail for an invalid password. Also my passwords are not words now. they can be sentances with spaces and any key but still MD%() into the database. This should be ok shouldent it?
  20. Hi I have used md5 encription on my websites for security. Passwords for example. Also passing information between pages also. I have been seing on some websites that require email validatin the following ... ?id=CJmEifn7tM_l2gEQy8yKxLyc0MBa&hl This is not md5 is this a new and more secure encription? Seems to have upper and lower case as well as other symbols. TIA Desmond.
  21. Hi Guys The one advantage of using a frameset is that you only have to reload one frame. If I did this I could have a flash banner that rotated it's images. If I used dives then every time I went to a new page the flash would go back to the beginning. If I had an updatable session variable that would maintain state then this would solve this. I would need to update the session variable on each change and flash to read the session on start. Is this achevable or is there another solution to this. Thanks in antisipation Desmnd.
  22. Hi. I have drop down boxes for date and time that work. The year is a problem because I am using variables instead of fixed values. <select name="Year" style="width:60px"> <option value="2010" >Test <option value="<?=$ThisYear?>" <? if ($Year == "<?=$ThisYear?>"){?> SELECTED <?}?> ><?=$ThisYear?> <option value="<?=$NextYear?>" <? if ($Year == "<?=$NextYear?>"){?> SELECTED <?}?> ><?=$NextYear?> </select> <select name="Hour" style="width:50px"> <option value="10" <? if ($_SESSION["Hour"] == "10"){?> SELECTED <?}?> >10 <option value="11" <? if ($_SESSION["Hour"] == "11"){?> SELECTED <?}?> >11 <option value="12" <? if ($_SESSION["Hour"] == "12"){?> SELECTED <?}?> >12 <option value="13" <? if ($_SESSION["Hour"] == "13"){?> SELECTED <?}?> >13 <option value="14" <? if ($_SESSION["Hour"] == "14"){?> SELECTED <?}?> >14 <option value="15" <? if ($_SESSION["Hour"] == "15"){?> SELECTED <?}?> >15 <option value="16" <? if ($_SESSION["Hour"] == "16"){?> SELECTED <?}?> >16 <option value="17" <? if ($_SESSION["Hour"] == "17"){?> SELECTED <?}?> >17 <option value="18" <? if ($_SESSION["Hour"] == "18"){?> SELECTED <?}?> >18 <option value="19" <? if ($_SESSION["Hour"] == "19"){?> SELECTED <?}?> >19 <option value="20" <? if ($_SESSION["Hour"] == "20"){?> SELECTED <?}?> >20 </select> however this works <select name="Year" style="width:60px"> <option value="2010" >Test <option value="<?=$ThisYear?>" <? if ($Year == "2011"){?> SELECTED <?}?> ><?=$ThisYear?> <option value="<?=$NextYear?>" <? if ($Year == "2012"){?> SELECTED <?}?> ><?=$NextYear?> </select> Can anyone help with this please TIA Desmond.
  23. Ok this forum dosn't allow updates I now have input[type="input"]:focus,input[type="password"]:focus,input[type="text"]:focus, textarea:focus { background:red; color:blue; } input[type=input]:focus is what I needed, but what then is ,input[type=text]:focus if textarea is textarea:focus Thanks Desmond. P.S. Set focus to the first would be cool !
  24. No I tried that and it is not a text area although that would be useful to know CSS = input[type="text"]:focus, textarea:focus { background:red; color:blue; } Code= <div><br> Company Key:<span style="color:blue;font-size:12px"> (Supplied by your administrator)</span></div> <div><input type="input" name="PWD2" size="25" maxlength="20" readonly="readonly" value="Not required" style="background-color:#777777;color:red"> <span style="color:red"><?echo $_SESSION["Error_2"]?></span></div> <div><br><br> User name:<br></div> <div><input type="input" name="Name" size="25" maxlength="20" value=""> <span style="color:red"><?echo $_SESSION["Error_1"]?></span></div> <div><br><br> User Key:<br></div> <div><input type="password" name="PWD1" size="50" maxlength="35" value=""> <span style="color:red"><?echo $_SESSION["Error_3"]?></span></div> <div style="height:20px"> </div> http://www.des-otoole.co.uk/library
  25. You could make your form center in the browser. But You can have what Microsoft call a model window that cant be re-sized and a fix width. I don't know how this is done but the other guys might. Also you have a problem with JO: SN: INV: You seem to have a rats nest of div inside div. You could have each one with its input in separate divs. Also give the div a width and float it left would align them up. If you have a style sheet you could make a neat set off classes for this.
×
×
  • 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.