Jump to content

mark s

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mark s's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I Cant see the images not displayed. Link is also dead:(
  2. 1. Use the $_POST to send your variables to your next page. 2. Your next page would include the error checking. if no mistakes display what will be sent. 3. confirm it looks ok, 4. Info is send / added to your data base or e-mail. You will find that it can be time consuming getting it to work, but your actualy building your self a template. Have Fun (I did)
  3. I'm new to GD and ive been playing around to get a feel, Its not as easy as i may have thought. I have managed to shrink pictures, (Thumbnails), and add a water mark. But only 1 image per php page. I have had some problems getting my head around displaying any GD images with HTLM code, but im making small advances. Anyways after reading up about GD and getimagesize i came across this piece of code. Original [u]http://uk.php.net/manual/en/function.getimagesize.php#36452[/u] Author janoma_cl his comments are included. [code]Please use the link above? As i'm unable to include the code in this post. Error The resource cannot be displayed 406[/code] Ive been trying almost all day trying to make it work? Or make it useable. I would like to get it working so i can understand whats happeing, and learn more. I believe the code above to be working but its me that's making the mistakes? I have become confused, and lost. I have copied and pasted the code into a php file. ive also included before the thumbnail function $file = '/temp/car.jpg'; I have tried many diffrent variations, but i cant get the above to work. If some one could help it would be most appreciated. Do i have to have 2 files? one for the html and one for the function?? Thanks in advance for any help. Mark.
  4. I see what you mean, But i'm still curious? For example myphp admin for controling your databases. When working in php admin control panel, it works the way i would love to be able to reproduce. You can see the Actions / requests being done, but in the staus bar only. The top address bar remains static. You can sort the contents accending or disacending if you click on the colom name at the top of your table in browse mode. So its not a "Button" it is a link. I know it looks like a frame to the left listing your DB Tables. Does Php Admin use java script or do they just have it sussed? Can anyone enlighten me please, as i'm sure many could benifit from advice given. Thanks in advance mark.
  5. require("menu.php") looks like its missing a ; at the end too.
  6. I use this [code]echo "<TD WIDTH=\"60\" ALIGN=\"CENTER\">             <A HREF=\"$PHP_SELF?action=is_spam\"                onClick=\"return confirm('Will be Changed to SPAM');\">             Change</A>             </TD>\n";[/code] Hope that helps :)
  7. Hi i'm really struggeling to find a soloution to my problem. Ive search PHP FAQ and the headers post but the links are no longer active to the relevent posts for more info. What i need to be able to do is remove the last action that is sent to the address bar to prevent a user error? / Duplicate request if the end user uses the Refresh button in there browser. Or is it okay leaving it displayed? I created a refresh button on my page, but habbit makes users use there Browser Refresh button. Example index.php5?action=delete_record Delete record is part of a function which is actioned by clicking on a link "Delete Record" which access my database and then deletes the record. What i would like to achive if possible is to be able to return to the same page but only index.php5 in the address bar. As the delete record changes the results in my displayed table. I have been trying for a while to get this result with out any luck. Ive read that the Header() must be the first thing at the top of my page. And i tried placing the Header (http://www.***/index.php5) But it seemed to go into a loop and my page wouldnt update? Ive covered the "White spaces" as a possible issue. So i get the idea how important it is the have the Header() at the top of the page but i cant get it to work? ---- My page displays a database results with diffrent options attached to functions. Enter / Delete / My page code... [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>SPAM</title> <style type="text/css"> <!-- .style1 {color: #FFFFFF} --> </style> </head> <body> This area has the page layout (HTML) And the PHP code which uses SWITCH to retreieve the function $GET switch($_GET['action']) { </body> </html> [/code] --------------------------- Can anyone point me the right direction please.? How if possible could i include the Header() in each function, to prevent that last action being displayed? I looked up ob_start but got more lost. and decided to post for opinions and help. Do i have to wrong approach? What could / should i do ? index.php5?action=delete_record to this index.php5 Help
  8. Hi, I hope you can help. I have Refrence books etc but i cant find the refrence to $thisform = <<<MYFORM MYFORM; i'm trying to look it up but cant find anything in the index? Ive been through my books almost page by page. What is it called and how can i look it up in the online PHP Manual? I'm having a couple of issues which i need to read up on. issuses Its playing havoc with a Template and Editable Region in Dreamweaver. And not a big thing but a snip it of php to echo out an IP address. I have used the above in the past but cant find my refrences, i have a big postit ready to mark the pages.... Thanks in advance. Mark.
  9. Is RSS Auto Discovery possible with a php page? Please check this link.. [a href=\"http://keithdevens.com/weblog/archive/2002/Jun/03/RSSAuto-DiscoveryPHP\" target=\"_blank\"]Click me[/a] to view code. I'm not sure if my brain has given up today, after searching and searching... Does the code on the link provided, make a php Auto Discoverable with php? If so how do i call the functions? Does all the code fit in the <body> tags or <head> tags ?? Please help, ive been going around in circles... I have managed to get the normal Auto discovery to work with a .html page. But the same tagg wont work if my page is php. [code]<link rel="alternate" type="application/rss+xml" title="RSS Feed for ..............." href="rss10.xml"/> [/code] My brain has turned to jelly...... Any help, links, advice appreciated thanks..
  10. Any help would be appreciated, as i need to iron out this possible error before i make my page live. Links Tutorails Somthing that may hep... All appreciated.. Thanks for reading.
  11. Check my topic. 1. I also had a poblem with redeclare 2. Resolved the problem posting code [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=88217\" target=\"_blank\"]Click me[/a] Hope it helps :)
  12. A problem i didnt expect has cropped up? Ive continued to use the code in post 2 above, for formating purposed. And i have re-named the functions with 2, 3, 4, and so on in respective inc files. So i now have 4 RSS Feeds being displayed. But one of them failed (For an hour or so). But the knock on effect is that only half of my web page was displayed. And any inc files after that one failed to show at all. Like the code and all following code had been stopped. This is the function that calls the Feed. [code] function characterData2($parser, $data) {     global $rss_channel, $currently_writing, $main, $item_counter;     if ($currently_writing != "") {         switch($main) {             case "CHANNEL":                 if (isset($rss_channel[$currently_writing])) {                     $rss_channel[$currently_writing] .= $data;                 } else {                     $rss_channel[$currently_writing] = $data;                 }                 break;             case "IMAGE":                 if (isset($rss_channel[$main][$currently_writing])) {                     $rss_channel[$main][$currently_writing] .= $data;                 } else {                     $rss_channel[$main][$currently_writing] = $data;                 }                 break;             case "ITEMS":                 if (isset($rss_channel[$main][$item_counter][$currently_writing])) {                     $rss_channel[$main][$item_counter][$currently_writing] .= $data;                 } else {                     //print ("rss_channel[$main][$item_counter][$currently_writing] = $data<br>");                     $rss_channel[$main][$item_counter][$currently_writing] = $data;                 }                 break;         }     } } $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "characterData"); if (!($fp = f**open($file, "r"))) {     die("could not open XML input");     } while ($data = fread($fp, 4096)) {     if (!xml_parse($xml_parser, $data, feof($fp))) {         die(sprintf("XML error..: %s at line %d",                     xml_error_string(xml_get_error_code($xml_parser)),                     xml_get_current_line_number($xml_parser)));     } } [/code] And its this part i belive i need to modify.. To prevent the following error : could not open XML input [code] $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "characterData"); if (!($fp = f**open($file, "r"))) {     die("could not open XML input");      } while ($data = fread($fp, 4096)) {     if (!xml_parse($xml_parser, $data, feof($fp))) {         die(sprintf("XML error..: %s at line %d",                     xml_error_string(xml_get_error_code($xml_parser)),                     xml_get_current_line_number($xml_parser)));     } [/code] I read that replacing "Die" With "Return Would / could Help. [code] $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "characterData"); if (!($fp = f**open($file, "r"))) {     //die("could not open XML input");     echo "Feed Not Available";     return; } while ($data = fread($fp, 4096)) {     if (!xml_parse($xml_parser, $data, feof($fp))) {         die(sprintf("XML error..: %s at line %d",                     xml_error_string(xml_get_error_code($xml_parser)),                     xml_get_current_line_number($xml_parser)));     } [/code] But it then caused an error from this part. XML error..: s at line 1 [code] while ($data = fread($fp, 4096)) {     if (!xml_parse($xml_parser, $data, feof($fp))) {         die(sprintf("XML error..: %s at line %d",                     xml_error_string(xml_get_error_code($xml_parser)),                     xml_get_current_line_number($xml_parser)));     } [/code] I guess i looking for a way to prevent a failed Feed stopping the rest of my code running. Is it possible to make a timeout for recieving a Feed, as opening my page can on occasion take what seems for ever? (20 seconds). ----- Summary Feeds are called from my main page as inc files. There are 4 feeds 1,2,3,4 (inc files) If feed 1 fails then everything stops? Main page is only half loaded, and no other feeds are excecuted. How can i keep the main page and none failing feeds to be shown. I cant move my inc request on my main page due to formating. And finally is there any way to time out a feed, to speed up the displaying of my web page if a feed is not available. Any help will be appreciated thanks.
  13. That works great :) Thanks for that..... Its another diffrent way of showing RSS Feeds. I will have to tweak it a little to display it the way i want, but it does the job, looking at the feeds from one file, which is better than indivdual files all over the place... I also need to work out a way i can cap the max feed from any one feed. Say 15 so i can format my page so it looks neat.. ---------------------------------- So looking at the code it checks the length of the feed and creates an array to suit. How can i write an if statment to say dont show any more than 15 from a Rss feed? as i'm wondering if the Feed count is less than 15 say only 7 would an if statment then fail ?? Any help would be appreciated thanks... Mark... Thanks for the code above its really neat, i like it.
  14. I'm a 1 and 1 customer too. You need to down load a program from your control pannel called. (Ive forgot) But its what the recomemnd. Down load that. Run it from your desktop. The settings you require should be on 1&1 for the connection. Then you connect to your ssh and you can then work out the comands to to time your script. You make a script file which points to the file you want to do what ever. and that's it. I'm not at home now so i can send you settings etc or point you in the right direction. Message me your e-mail adress and i will get back to you later today. My script automates a back up of my forums. It did take me a while to get my head around cron jobs, but after a while of practice. I'm no expert but i should be able to help you get started with somthing simple. My scriot if i remember right is CGI / Perl as i wasnt sure if a Script file could be php or not. But someone may answer that below.
  15. You may be able to pick the bones out of this one? [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=87519&hl=\" target=\"_blank\"]Click Me[/a] I had a simular issue with drop combo boxes. It will show you on a submit you can get a result to show pulled from the database. -------------- Its not perfect but it works.
×
×
  • 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.