Jump to content

the_oliver

Members
  • Posts

    364
  • Joined

  • Last visited

    Never

Everything posted by the_oliver

  1. Are you aware of what port they are getting in on?
  2. Im assuming that you tried changing $host = "localhost"; to your servers IP address? It could be that your DB service is not liking connections as root.
  3. This is probably due to the charictor type. You can try setting: header("Content-Type: text/html; charset=utf-8"); The best option would be to replace the symbole with its HTML Code. Eg: £ becomes £ http://www.ascii.cl/htmlcodes.htm is very usefull. You can always do a search and replace as data comes out of the database onto a page if needs be. Hope that helps
  4. frost110's solution worked perfectly! Many thanks!
  5. Hello, Im trying to search for a charictor in a string using the following. $arr = array("\"","<",">"); if (strpos($field, $arr) === false) { } if i specify a charictor instaead of using $arr it works fine, however if i use and array ($arr) it won't work. I need to search for more then one charictor! Can anyone tell me a good way round this? Thanks!
  6. Hello, Im looking for a way to pop up a message or box when a user types one of sevrial charictors into a textbox. Can anyone point me in the direction of an example or tutorial they may know of? Thanks!
  7. I think that must have been a typo. I ran: $htmlurl = "e011_Again_It's_!_$_&_'_(_)_|_\\\"_;_:_\_._<_>_`.htm"; $en = urlencode($htmlurl); echo $en."<br>"; //ENCODED echo $htmlurl."<br>"; //PLAIN echo urldecode($htmlurl); //DECODED And got Thanks for your help so far!
  8. Actual file name: Code: $htmlurl = "e011_Again_It's_!_$_&_'_(_)_|_\\\"_;_:_\_._<_>_`.htm"; $text .= "<a href=\"".urlencode($htmlurl)."\" target=\"blank\">$htmlurl</a>"; If i do View Source:
  9. Ok, but is there a way of doing the with out changing the charictors, as the file is named using the < > and " charictors not %3C etc. If i use %3C in the link, it tells me the page cannot be found! Thanks
  10. Hello, I tried all the options on that page and always got something like: e011_Again_It's_!_$_&_'_(_)_|_/%22_;_:_/_._%3C_%3E_`.htm in the link rather then the e011_Again_It's_!_$_&_'_(_)_|_\"_;_:_\_._<_>_`.htm i was expecting. (sory its so long! Just checking to see what causes problems!) They all replacesd the symbols with something else, rater then just telling it to do something like skip over them. Thanks.
  11. Hello. I have a files which could be something like: gunk>stuff"yes.htm But when i link to them this causes havouc with the HTML! I tried relpacing them with \> and \" but that didn't make any diffrence. Whats the way round this? Thanks.
  12. the_oliver

    Help with John

    normaly in /etc/passwd will not be in clear text though.
  13. Thank you. Is there any way i can get round this? Perhaps putting the image under the table? The thing with that is that i dont know where the table will be, as there could be any number of copys of it. Ta!
  14. http://www.supanames.com/support/open_basedir.html - has a good explination. Odvious question: Is the web users (apache usualy) actualy permited to read that file? I had this problem a while back and found that selinux was the problem. dont know if thats of any relivance to you.
  15. Hello, Im looking for a way to split a string into an array. Eg: if the string was name,name1,name2 i would split it so that each part of the array read name name1 name2 Thanks!
  16. Hello, Can someone tell me what im doing wrong with the code bellow please? I get print_ticket called lots of times, with 1 as the hash,name,ticket_no responce. (i have chequed that the query is returning the right results). $return = pg_query($pg_connection, $query); $data = pg_fetch_array($return); foreach ( $data as $temp ) { echo print_ticket ($temp['hash'],$temp['name'],$temp['ticket_no']); }
  17. Hello. I have a table with a background image. When i print the page however i dont see the image, just the contents of the table. Can any one suggest why? Many Thanks
  18. Thanks. Worked well other then with the < charictor. ( the output i was expecting was \> ) Im trying: $str = "<"; $invalied_chars = array("<"); $writein = array("\\<"); $result = str_replace($invalied_chars, $writein, $str); echo $result; I also tried: $writein = array("\\<"); and got the output \\ And $str = "<"; and got the output \\\ Can any one suggest where im wrong? Thanks! EDIT: i cant use < of char() as it will end up being output to create a unix file name, not for web output.
  19. Hello, Im using the following to search for charictors in a string that are causing problems, and placing a \ infrount of them. Im trying to do it using: <?php $str = "string's"; $invalied_chars = array(" ", "'"); $result = str_replace($invalied_chars, "\\", $str); echo $result; ?> The bit im confused by was how to keep the old charictor, just proceeding it with a \ rather then replacing it? Thanks
  20. $mail_header = "MIME-Version: 1.0" . "\r\n"; $mail_header .= "Content-type: text/html; charset=iso-8859-1" . "\r\n"; Thanks! (works fine without the From: bit)
  21. mail($EmailTo, $Subject, $Body, $mail_header, "From: <$from>"); Hello im trying to set the from address in an email, but when i do it with the above it doesnt work! Instead it stops the header being set to HTML and shows that code. Can any one tell me where im going wrong? Also how can i send attatchments with an email? Thanks!
  22. Thanks. As stage further! I tried the code below. Strange thig was that both $t_holder and $t_holder2 came out as 6 The data returned from the query was: // Calculate the total number of tickets sold and pitches required $query1 = "SELECT tickets,pitch FROM t_order_numbers WHERE paypal_confirmed = 'true'"; $t_totals = pg_query($pg_connection, $query1); $t_data = pg_fetch_array($t_totals); $t_holder = 0; // Holder for the finnal ticket total (paid for) $t_holder2 = 0; // Holder for the finnal pitch total required foreach ( $t_data as $temp ) { $store = $t_holder; $t_holder = $store + $temp['tickets'] ; $store2 = $t_holder2; $t_holder2 = $store2 + $temp['pitches']; }
  23. Hello, Im trying to get some data from a database and then add all of the entries in each columb to get the total for each columb. I tried it with the following code but got the error: Warning: Invalid argument supplied for foreach() Thanks for any help! // Calculate the total number of tickets sold and pitches required $query1 = "SELECT tickets,pitch FROM t_order_numbers WHERE paypal_confirmed = 'true'"; $t_totals = pg_query($pg_connection, $query1); $t_data = pg_fetch_array($t_totals); $t_holder = 0; // Holder for the finnal ticket total (paid for) $t_holder2 = 0; // Holder for the finnal pitch total required foreach ( $t_data['tickets'] as $temp ) { $store = $t_holder; $t_holder = $store + $temp; } foreach ( $t_data['pitches'] as $temp2 ) { $store2 = $t_holder2; $t_holder2 = $store2 + $temp2; }
×
×
  • 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.