Jump to content

kicken

Gurus
  • Posts

    4,704
  • Joined

  • Last visited

  • Days Won

    179

Everything posted by kicken

  1. Yes, an INSERT does not return a result set, so there is nothing to free. INSERT just returns a true/false indicating if the query ran successfully or not.
  2. No, <font> has been deprecated for a while, and is no longer valid in html5. @limitphp You should use CSS to apply the font you need to the element containing your text. The element you use should be sematic for whatever the text represents/means on the page. If you need a generic element to wrap a small bit of text, use <span> or <div> depending on if you need inline or block level elements.
  3. Not really. Not without cooperation with the other site. They would have to send notification messages whenever anything interesting happens.
  4. It'll only work if the frame is from the same origin as the parent script. If they are different, it is blocked by the same-origin policy, and you'd just get an error along the lines of Unsafe Javascript attempt to access frame with URL http://example.net/ from frame with URL http://example.com/. Domains, protocols and ports must match.
  5. kicken

    :last-Child

    Such are the ways of the webdesigner. The more browsers you want to support, the harder it's going to be for you. You don't need JS just to identify the last one. I assume by putting it in a while loop you mean using PHP or some other server language. Just use a variable to identify the last iteration of your while loop and add the last class when you generate the html.
  6. You'd have a table for all your translators, and a table for records, another for payment, etc. Each record/payment row would contain the ID of the user it belongs to, then when you query for a user's stuff just include a WHERE UserId=$CurrentUserId in the query to limit the results to only their records.
  7. kicken

    :last-Child

    sure it does, and it has decent support. However, it doesn't appear to be useful in your situation because it doesn't take the class name into consideration so it still considers the <div class="clear"> element to be the last. If you need IE7 support, your best bet is making your own class to represent the last element. eg: <div class="groups"> <div class="group"></div> <div class="group"></div> <div class="group last"></div> </div> .groups { display: block; border: 1px solid yellow; padding: 10px; width: 300px; } .group { display: block; border: 1px solid red; background: black; width: 100px; height: 100px; margin: 10px; } .group.last { background: white; border: 1px solid black; }
  8. kicken

    :last-Child

    You don't have a group that is the last-child. The last child of your groupBox element is: <div class="clear"></div> You could try :last-of-type instead, or just create another class to use that indicates the last one and add it to the element yourself.
  9. kicken

    :last-Child

    Nothing in that HTML has a class of groupCategories, so neither of your CSS rules apply to anything.
  10. see HEADER ERRORS - READ HERE BEFORE POSTING THEM
  11. 'ban' as type is a static column. Rather than referencing any actual column in your table, it will always use the static string 'ban' as the value for that column in the results.
  12. It's not possible to monitor the status of an iframe when the content it is showing is not yours, due to a security policy browsers implement called the same-origin policy. The most you can do is tell if they have entered the iframe, and then update the status to complete or failed when paypal notifies you of the result.
  13. 1) You need to quote your array keys, as in: setcookie( "FirstName", $_POST['FirstName'], time()+60), "/", "***.com" ); 2) You have an extra ) on each line after your expires argument.
  14. That would give you a command of (assuming $year is set to 11) cat data.txt | grep -i11 -B 1 -A 25 which is incorrect. You need a space between the -i and the variable contents.
  15. That variable definition needs to be inside your validatePage function. By placing it outside, you are attempting to get that field's value as the page loads, which due to the placement of the script, happens before the field or the form exists yet. Even if it did work, it would only get the value of the field when the page loaded (ie, blank), not the value after someone entered their data.
  16. According to the WHOIS info I see for the domain, it's nameservers are listed as ns1.sharics.com and ns2.sharics.com. Neither of those will resolve to an IP for me. Are those correct and should they be resolving to the listed IP addresses? Also trying to query your listed IP's directly fails due to not being able to contact them. Have you verified that bind is configured and running properly? Do you have any firewalls or routers that may be blocking the connection? To check if bind is running and configured, try querying it locally. From the machines that are running bind, use dig yourdomain.com @127.0.0.1 and see if you get the proper response. If both machines work with that, then next check for any firewalls or routers that may be blocking the connection.
  17. You need to setup the nameserver IP's at your registrar's website. They should have a tool somewhere to configure them. Just go there and punch in the IP's for them.
  18. PHPWord. As for downloading a library, you just download the .php files and then include them in your script. The library's website should have more specific documentation regarding how to use it.
  19. SELECT a.email FROM a LEFT JOIN b ON b.email=a.email WHERE b.email IS NULL That will join to table b matching up rows by the email field. If no row exists in table b matching table a's email value, then all the fields in b will be NULL for that record. The WHERE condition then filters the result to only the rows where the b.email field is null, meaning you only get the email's from a with no match in b.
  20. Use an array to store the question data. To have your form inputs create an array, name them with [] on the end. Eg: <form method="post"> Question 1: <input type="text" name="question[]"> Question 2: <input type="text" name="question[]"> Question 3: <input type="text" name="question[]"> ... </form> In your PHP code then, $_POST['question'] will be an array of all the values submitted. You can use a foreach() loop to iterate over it and do whatever you need to for each question.
  21. When array_walk_recursive invokes the defined callback function, it will pass it two parameters, the first being the value, the second being the key. As such, the function needs to expect two parameters in it's definition, hence the $v and $k. For the purpose of what the function actually does the key is unnecessary so it's not used in the function body but it needs to be in the parameter list to create the correct function signature. $v is a reference so that any changes made to it are reflected in the original array's value. For example, if you had: $num = array(1,2,3); function sq($v, $k){ $v = $v*$v; } array_walk($num, 'sq'); print_r($num); The result of the print_r would show the array $num is the same as it was before, 1,2,3 rather than 1,4,9 as one might expect/desire. By making the $v parameter a reference though: $num = array(1,2,3); function sq(&$v, $k){ $v = $v*$v; } array_walk($num, 'sq'); print_r($num); The code works as expected and $num becomes 1,4,9 after the array_walk call.
  22. If you look at the insert query you are generating, you will see something like this: insert into login values ( 'foo',' bar',' blah',' meh','' ) As you can see, you're attempting to insert 5 values into a table that only has 4 columns. Remove your extra empty value from the end. Another issue is that your pre-pending a space to the values you are inserting into the email, username, and password columns
  23. You need to use $_GET['show'] to access the variable from the URL. Being able to use $show directly is an old "feature" called register_globals which has since been removed as it generally causes more harm than good. Check out the manual page on superglobals for some details about what variables to use and when.
  24. Do you mean you have something like this then: +------------------+------------------+----------------+------------------+----------------+------------------+----------------+ | Date |Test Strip result | Temp Begin day |Test Strip result | Temp Begin day |Test Strip result | Temp Begin day | | +------------------+----------------+------------------+----------------+------------------+----------------+ | |P or F | C or F |P or F | C or F |P or F | C or F | +------------------+------------------+----------------+------------------+----------------+------------------+----------------+ | 1 | P | 68 F | P | 68 F | P | 68 F | +------------------+------------------+----------------+------------------+----------------+------------------+----------------+ | 2 | P | 69 F | P | 69 F | P | 69 F | +------------------+------------------+----------------+------------------+----------------+------------------+----------------+ | 3 | P | 69 F | P | 69 F | P | 69 F | +------------------+------------------+----------------+------------------+----------------+------------------+----------------+ | ...31 | P | 69 F | P | 69 F | P | 69 F | +------------------+------------------+----------------+------------------+----------------+------------------+----------------+ If so I'd probably create one table to represent the report as a whole which stores the header information, and a second table to hold the test result/temp/date information with one row per day. Something like: CREATE TABLE Report ( ReportId INT IDENTITY(1,1) NOT NULL PRIMARY KEY, Department VARCHAR(100), ReportDate DATE, Solution VARCHAR(100), Metricide VARCHAR(100), Other VARCHAR(100) ... ) CREATE TABLE ReportMeasurements ( ReportId INT NOT NULL REFERENCES Report (ReportId), MeasureDate INT NOT NULL, TestStripResult CHAR(1), TempBegin NUMERIC(4,1) TempScale CHAR(1) )
  25. Simplest thing to do would be something like this: SELECT SUM(cnt) FROM ( SELECT COUNT(*) as cnt FROM table1 UNION ALL SELECT COUNT(*) as cnt FROM table2 UNION ALL SELECT COUNT(*) as cnt FROM table3 UNION ALL SELECT COUNT(*) as cnt FROM table4 ) tblcnt Personally, I don't see much point in why you're trying to do such a thing, and makes me question what you're doing.
×
×
  • 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.