Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. no problem, glad to help.
  2. it's likely a crawler trying to run through a sitemap file tat was created by a script installer with both http and https options, of which you chose http. It's just pointing out that something has atempted to open those pages, and that those pages are not on your server. from the look of the page titles they are only custom error pages anyway, except for /home/affilinn/public_html/favicon.ico which is as it sais, a favicon icon that can't be found.
  3. The other way to do it is to change your quotes. PHP takes single quotes as literal, as in it will build a sting with exactly what is inside them, without preprocessing the values of any variables that you put in in, use double quotes to get around this. In your example you have a lot of double quotes inside the string, so you would either need to change them all to single quotes or escape them by putting a \ directly before them. also, when using array values in a double quoted sting wrap the declaration inside {}. so using the escaped method it would look like this: <?php $ext = " <form action=\"/members/clubs/view-activity.php\" method=\"post\" name=\"venuefrm\"> <button type=\"submit\" id=\"close\" class=\"link\"><span>View Activity</span></button> <input name=\"activity\" type=\"hidden\" value=\"{$activites['activityID']}\" /> </form>"; ?> Another way to write blocks of string content into a variable is to use <<<UID to open the block and UID; to close it, where UID is a unique name for the string block. eg: <?php $ext = <<<FORM <form action="/members/clubs/view-activity.php" method="post" name="venuefrm"> <button type="submit" id="close" class="link"><span>View Activity</span></button> <input name="activity" type="hidden" value="{$activites['activityID']}" /> </form>; FORM; ?> You must make sure that there are no leading spaces on the line where you close the block (FORM; in this case) or it will create an error.
  4. would something like this be better then? $errorOut = ''; foreach ($_REQUEST as $key => $value) { $myArray[$key] = trim($value); } if (isset($myArray['reset'])){ session_destroy(); header ('location: /'); } foreach ($myArray as $k => $v){ if( !$v || empty($v) || $v == ''){ echo "$k has no value!"; } else{ if((($k == 'tel' || $k == 'mobile' || $k == 'address')&& (strlen($v) < 6))||($k == 'postcode' && strlen($v) < 5)){ $errorOut .= "$k does not conform to minimum length requirements.<br>"; } } } if ($errorOut != ''){ echo $errorOut; } else{ //do whatever }
  5. Well that's me got a nice shiny new one ripped for me That's my old school procedural brain defaulting to what it knows best: if you declare it, it exists - if there is something in it or not, it still resides in memory and can be addressed. That's why I did think that empty($var) and !$var were different checks. goes to show though - it's not just women that shouldn't be taken for granted
  6. ok, as far as I know you can't use GROUP BY in an update, also there is no GROUP BY in that code that I can see, and on another note, that's some seriously tedious CASE work, it looks a lot like you would be better making a new refference table for that info and selecting the values you need from that.
  7. // this allways errors out because the session exists... i hate this class.... $sql = 'REPLACE INTO `' . $roster->db->table('sessions') . '` ' . $roster->db->build_query('INSERT', $xsql_ary); $s = $roster->db->query($sql); $qry1 = "UPDATE `" . $roster->db->table('user_members') . "` SET `online` = '1' WHERE `id` = '".$sql_ary['session_user_id']."'"; $q = $roster->db->query($qry1); Somethings not working in your record existance check, have you done any var_dump()'s on these to double check that they are what they should be? Ones to focus on: if(isset($rec['session_id']) && $rec['session_id'] == session_id()) $rows = $roster->db->num_rows($result);
  8. Use something like the following: $sql = "SELECT mname FROM tableName"; $result = mysql_query($sql); while($row = mysql_fetch_assoc($result){ $myArray[] = $row['mname']; } $myList = implode(', ', $myArray); echo $myList;
  9. yes, as long as they are valid when they are translated there is no reason it will not work. On another note, don't insert null into an auto inc field, address the fields that you are inserting to explicitly: mysql_query("INSERT INTO blackmarks (dateFieldName) VALUES (DATE_ADD(NOW(), INTERVAL $amount $unit))") or die(mysql_error());
  10. yeah, we'll need to see enough of the code to establish where the INSERT query is coming from, and why your code thinks that it should be running that rather than the UPDATE. I'm not sure what you're reffering to by "manualy freeing query results" either as neithter UPDATE nor INSERT produce a result set of any consiquence.
  11. Don't know if this will work, but you could try: $tag = array($sc001->NTResult->results->TaggedText->tag); foreach ($tag as $tagNum){ echo $tagNum; }
  12. clearly it's executing a different query. without the rest of the code that's all that can be said.
  13. could you also post end page source for the OOP version that the css does not work on, it could help us narrow down the point where it all goes awry. Also, what browsers have you tried on? some are stricter than others with CSS and may render some objects even if there are overall errors in the page source, while others just plain refuse to work anything.
  14. That's one for javascript/AJAX. But yes, it is possible.
  15. Well, yeah it is, but it's right up there with "why do wasps exist". What would help us to help you would be specifics: what exactly doesn't work, you posted 5 pages of code, very few people are going to sift through all of that without having some semblance of what they are looking for, and even fewer will be able to find the issue. What parts of the class do work (if any) and which are causing the problem, how does the issue manifest, what have you done to debug thus far? The more verbose you can be about the problem the better the responses you will get. oh, and don't use curly braces around single flat variables within strings, it's not needed and can confuse PHP into thinking that it's being passed a dodgy array: $this->t_content .= " <li class='nav{$i} = $this->t_content .= " <li class='nav$i
  16. your problem is here: if (!$name || !$email || !$email2 || !$tel || !$mobile || !$housenum || !$address || !$postcode){ You see, you assign these variables on the lines above this check, so they exist - regardless of contnent in the $_POST[] fields or not, you are only checking: do these variables exist in this script, answer = yes, you just defined them. what you need to do is check if they are empty if (empty($name) || empty($email) || empty($email2) || empty($tel) || empty($mobile) || empty($housenum) || empty($address) || empty($postcode)){ this is really not proper input checking, you should do some more complex checks on this. If I came along to your form and filled out every field with 6 spaces it would submit. Also, I could spam the ass out of you using it and not have a single mail come back to me.
  17. Why do you think this is a PHP problem, when your PHP version is the only constant here? I would suggest looking over the IIS5 configuration and checking the runtime implememntation of PHP and the permissions that it is granted. IIS7 and IIS5 use different implememntations of the CGI/FastCGI runtimes for scrip languages, and servers have more restrictive runtime permissions that desktops do.
  18. I thoght it would be IIS, that things a ball ache every way you look at it. Here, this may help get you going again: http://php.net/manual/en/errorfunc.configuration.php
  19. The way I look at it, DOMDocumet does what it does because it is meant to do it that way. So rather than hacking at the results it gives how about having a look through this: http://www.ultramegatech.com/2009/07/generating-xhtml-documents-using-domdocument-in-php/ and making it do what your really trying to achieve?
  20. to store an image in a database you would need to use a field type of blob, and then return it using whatever script you are using. I don't recomend this aproach however, I suggest storing binary data in it's natural file format and linking to it, storing the link in the database.
  21. you need to include session_start() at the top of every page. then you would be better using the session to force the person to not move back as long as you are moving your POST variables into the session at each submit you should maintain the data without needing to make multiple writes to the database. This is a quick mock up of the simplest way I can think of just now (I've not had my coffee yet!) to force people out of accessing the previous pages, you would obviously need to edit the array values to your actual pages and have the $pageNum set from 1 - 4 on the respective form pages. <?php session_start(); $pageList = array( 1 => 'http://page1.php', 2 => 'http://page2.php', 3 => 'http://page3.php', 4 => 'http://page4.php'); $pageNum = 1; if (isset($_SESSION['page_num']){ if($_SESSION['page_num'] < $pageNum){ header("location: {pageList[$_SESSION['page_num']}"); } else{ $_SESSION['page_num'] = $pageNum; } //rest of page
  22. either in Editor Help >>> http://www.phpfreaks.com/forums/index.php?board=16.0 or PHP Instalation & Configuration >>> http://www.phpfreaks.com/forums/index.php?board=7.0 But just report your thread (using the link at the side) and a moderator will move it for you, this saves double posting and means you don't have 2 threads to watch
  23. not enough code, nothing of what you posted actualy controls display.
  24. Your actualy bumping a topic you only started yesterday on a forum where bumping in any form is aginst the rules?....That's kinda rude. you'll need to try harder, that doesn't clear things up: you merged old and new inserting only new, now you need to update a different table with only old....
×
×
  • 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.