Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. Websites are usually dynamic and fetch data from a database these days, not solely static html pages. For that some sort of CMS(content management system) is required. As for the frontend there is a template(layout structure) or theme(styles) A responsive html5 template is what you would want. For the delayed loading or endless scrolls is javascript/ajax or jquery, usually called lazy load, lazy loader, lazy loading If you do not know how to code or do your own web design then try a popular premade cms wordpress, joomla, drupal For each of them they have a wealth of free themes and plugins, or can also purchase some better ones.
  2. Could purchase the plugin to do this http://www.magentocommerce.com/magento-connect/additional-checkout-attributes-custom-fields-manager.html
  3. Agree with the others. That tutorial is almost 6 years old now, that's an eternity in coding time. When looking for registration tutorials look for PDO and password_hash() and should be a better start for you. Also a lot of tutorials are written as an example of how to accomplish something, is up to you to ensure are safe and secure.
  4. I don't see $currentEvent in your previous posted code. I'm wondering how this didn't work. <?php } ?> <span><?php echo esc_attr($start_date); ?></span> <?php } ?> Does your original code work with date and also time? <?php } ?> <span><?php echo esc_attr($start_date); ?> <?php echo esc_attr($start_time); ?></span> <?php } ?>
  5. Want to check if is a protocol, contains a decimal point first, Parse the URL , then end explode it, do an in_array() check in your array of top and generic domains. I have my own list I made including decimal points with top,second and generic domains, didn't feel like editing it so are extra in the array. <?php $domains = array(".abogado",".ac",".ac.ae",".ac.cn",".academy",".accountants",".active",".actor",".ad",".ads",".adult",".ae",".aero",".af",".africa",".ag",".agency",".agent",".ah.cn",".ai",".airforce",".ak.us",".al",".al.us",".allfinanz",".alsace",".am",".amsterdam",".an",".android",".ao",".apartments",".app",".aq",".aquarelle",".ar",".ar.us",".arab",".archi",".architect",".army",".arpa",".art",".arts",".as",".asia",".associates",".at",".attorney",".au",".au.com",".auction",".audio",".auto",".autos",".aw",".ax",".axa",".az",".az.us",".b2b",".b2c",".b2m",".ba",".baby",".band",".bank",".bar",".barcelona",".bargains",".baseball",".basketball",".bayern",".bb",".bd",".be",".beauty",".beer",".berlin",".best",".bet",".bf",".bg",".bh",".bi",".bible",".bid",".bike",".bingo",".bio",".biz",".bj",".bj.cn",".bl",".black",".blackfriday",".blog",".bloomberg",".blue",".bm",".bmw",".bn",".bnpparibas",".bo",".boats",".boo",".book",".boutique",".box",".bq",".br",".br.com",".broadway",".broker",".brussels",".bs",".bt",".budapest",".build",".builders",".business",".buy",".buzz",".bv",".bw",".by",".bz",".bzh",".ca",".ca.us",".cab",".cafe",".cal",".cam",".camera",".camp",".cancerresearch",".capetown",".capital",".car",".caravan",".cards",".care",".career",".careers",".cars",".cartier",".casa",".cash",".casino",".cat",".catering",".cc",".cd",".center",".ceo",".cern",".cf",".cg",".ch",".channel",".charity",".chat",".cheap",".christmas",".chrome",".church",".ci",".citic",".city",".ck",".cl",".claims",".cleaning",".click",".clinic",".clothing",".cloud",".club",".cm",".cn",".cn.com",".co",".co.uk",".co.us",".coach",".codes",".coffee",".college",".cologne",".com",".com.ac",".com.au",".com.cn",".com.tw",".community",".company",".computer",".condos",".construction",".consulting",".contractors",".cooking",".cool",".coop",".corp",".corsica",".country",".coupon",".coupons",".cpa",".cq.cn",".cr",".credit",".creditcard",".cricket",".crs",".cruises",".ct.us",".cu",".cuisinella",".cv",".cw",".cx",".cy",".cymru",".cz",".dad",".dance",".data",".date",".dating",".day",".dc.us",".dds",".de",".de.com",".de.net",".de.us",".deal",".deals",".degree",".delivery",".democrat",".dental",".dentist",".desi",".design",".dev",".diamonds",".diet",".digital",".dir",".direct",".directory",".discount",".diy",".dj",".dk",".dk.org",".dm",".dnp",".do",".docs",".doctor",".dog",".domains",".doosan",".durban",".dot",".download",".dubai",".durban",".dvag",".dz",".earth",".eat",".ec",".eco",".edu",".edu.ac",".edu.af",".edu.cn",".education",".ee",".eg",".eh",".email",".emerck",".energy",".engineer",".engineering",".enterprises",".equipment",".er",".es",".estate",".esq",".et",".eu",".eu.com",".eu.org",".eurovision",".eus",".events",".everbank",".exchange",".expert",".exposed",".fail",".faith",".family",".fan",".fans",".farm",".fashion",".feedback",".fi",".film",".final",".finance",".financial",".firm",".firmdale",".fish",".fishing",".fit",".fitness",".fj",".fj.cn",".fk",".fl.us",".flights",".florist",".flowers",".flsmidth",".fly",".fm",".fo",".foo",".food",".football",".forsale",".forum",".foundation",".fr",".free",".frl",".frogans",".fun",".fund",".furniture",".futbol",".fyi",".ga",".ga.us",".gal",".gallery",".game",".games",".garden",".gay",".gb",".gb.com",".gb.net",".gbiz",".gd",".gd.cn",".ge",".gent",".gf",".gg",".ggee",".gh",".gi",".gift",".gifts",".gives",".gl",".glass",".gle",".global",".globo",".gm",".gmail",".gmbh",".gmo",".gmx",".gn",".gold",".golf",".google",".gop",".gov",".gov.ac",".gov.ae",".gov.cn",".gp",".gq",".gr",".graphics",".gratis",".green",".gripe",".group",".gs",".gs.cn",".gt",".gu",".guide",".guitars",".guru",".gw",".gx.cn",".gy",".gz.cn",".ha.cn",".hair",".hamburg",".haus",".hb.cn",".he.cn",".health",".healthcare",".help",".helsinki",".here",".hi.cn",".hi.us",".hiphop",".hiv",".hk",".hl.cn",".hm",".hn",".hn.cn",".hockey",".holdings",".holiday",".home",".homes",".horse",".hospital",".host",".hosting",".hot",".hotel",".house",".how",".hr",".ht",".hu",".hu.com",".ia.us",".ibm",".id",".id.us",".ie",".il",".il.us",".im",".immo",".immobilien",".in",".industries",".in.us",".inc",".indians",".industries",".info",".ing",".ink",".institute",".insurance",".insure",".int",".international",".investments",".io",".iq",".ir",".irish",".is",".it",".iwc",".je",".jetzt",".jl.cn",".jm",".jo",".jobs",".joburg",".jp",".js.cn",".juegos",".jx.cn",".kaufen",".kddi",".ke",".kg",".kh",".ki",".kids",".kim",".kitchen",".kiwi",".km",".kn",".koeln",".kp",".kr",".krd",".kred",".ks.us",".ku",".kw",".ky",".ky.us",".kyoto",".kz",".la",".la.us",".lacaixa",".land",".lat",".latino",".latrobe",".law",".lawyer",".lb",".lc",".lds",".lease",".legal",".lgbt",".li",".lidl",".life",".lighting",".limited",".limo",".link",".live",".living",".lk",".llc",".llp",".ln.cn",".loan",".loans",".lol",".london",".lotto",".love",".lr",".ls",".lt",".ltd",".ltda",".ltd.uk",".lu",".luxe",".luxury",".lv",".ly",".m2c",".m2m",".ma",".madrid",".maison",".mail",".management",".mango",".map",".market",".marketing",".ma.us",".mba",".mc",".md",".md.us",".me",".media",".medical",".meet",".melbourne",".meme",".memorial",".men",".menu",".me.uk",".me.us",".med",".mf",".mg",".mh",".miami",".mi.us",".mil",".mil.ac",".mil.ae",".mil.cn",".mini",".mk",".ml",".mm",".mn",".mo",".mo.us",".mobi",".mobile",".moda",".moe",".mom",".monash",".money",".mormon",".mortgage",".moscow",".moto",".motorcycles",".mov",".movie",".mp",".mq",".mr",".ms",".ms.us",".mt",".mt.us",".mu",".museum",".music",".mv",".mw",".mx",".my",".mz",".na",".nagoya",".name",".navy",".nc",".nc.us",".nd.us",".ne",".ne.us",".net",".network",".neustar",".net.ac",".net.ae",".net.cn",".net.tw",".net.uk",".new",".news",".nexus",".nf",".ng",".ngo",".nh.us",".nhk",".ni",".ninja",".nj.us",".nl",".nm.cn",".nm.us",".no",".no.com",".nom.ad",".now",".np",".nr",".nra",".nrw",".nu",".nv.us",".nx.cn",".ny.us",".nyc",".nz",".oh.us",".ok.us",".okinawa",".om",".one",".ong",".onl",".online",".ooo",".or.us",".org",".organic",".org.ac",".org.ae",".org.cn",".org.tw",".org.uk",".osaka",".otsuka",".ovh",".pa",".pa.us",".paris",".partners",".parts",".party",".pay",".pe",".pet",".pets",".pf",".pg",".ph",".phd",".pharmacy",".phone",".photo",".photography",".photos",".physio",".pics",".pictures",".pid",".ping",".pink",".pizza",".pk",".pl",".place",".play",".plc",".plc.uk",".plumbing",".plus",".pm",".pn",".pohl",".poker",".porn",".post",".pr",".praxi",".press",".pro",".pro.ae",".prod",".productions",".prof",".properties",".property",".ps",".pt",".pub",".pw",".py",".qa",".qc.com",".qh.cn",".qpon",".quebec",".racing",".radio",".re",".realestate",".realtor",".realty",".rec",".recipes",".red",".rehab",".reise",".reisen",".reit",".ren",".rent",".rentals",".repair",".report",".republican",".rest",".restaurant",".review",".reviews",".ri.us",".rich",".rio",".rip",".ro",".rocks",".rodeo",".rs",".rsvp",".ru",".ru.com",".rugby",".ruhr",".run",".rw",".ryukyu",".sa",".saarland",".sale",".salon",".samsung",".sarl",".save",".sa.com",".sb",".sc",".sca",".sc.cn",".sc.us",".scb",".sch.ae",".sch.uk",".schmidt",".school",".schule",".schwarz",".science",".scot",".sd",".sd.cn",".sd.us",".se",".se.com",".search",".services",".sew",".sexy",".sg",".sh",".sh.cn",".shiksha",".shoes",".shop",".shopping",".show",".shriram",".si",".singles",".site",".sj",".sk",".ski",".sl",".sm",".sn",".sn.cn",".so",".soc",".soccer",".social",".software",".sohu",".solar",".solutions",".soy",".spa",".space",".spiegel",".sport",".sports",".spot",".sr",".ss",".st",".store",".stream",".studio",".style",".su",".supplies",".supply",".support",".surf",".surgery",".suzuki",".sv",".swiss",".sx.cn",".sy",".sydney",".systems",".sz",".taipei",".tatar",".tattoo",".tax",".taxi",".tc",".td",".team",".tech",".technology",".tel",".tennis",".tf",".tg",".th",".thai",".theater",".tickets",".tienda",".tips",".tires",".tirol",".tj",".tj.cn",".tk",".tl",".tm",".tn",".tn.us",".to",".today",".tokyo",".tools",".top",".tour",".tours",".town",".toys",".tp",".tr",".trade",".trading",".training",".travel",".trust",".tt",".tube",".tui",".tv",".tw",".tw.cn",".tx.us",".tz",".ua",".ug",".uk",".uk.com",".uk.net",".um",".university",".uno",".uol",".us",".us.com",".ut.us",".uy",".uy.com",".uz",".va",".va.us",".vacations",".vc",".ve",".vegas",".ventures",".versicherung",".vet",".vg",".vi",".viajes",".video",".villas",".vision",".vin",".vip",".vision",".vlaanderen",".vn",".vodka",".vote",".voting",".voto",".voyage",".vt.us",".vu",".wa.us",".wales",".wang",".watch",".web",".webcam",".website",".wed",".wedding",".wf",".whoswho",".wi.us",".wien",".wiki",".williamhill",".win",".wine",".wme",".work",".works",".world",".wow",".ws",".wtc",".wtf",".测试",".परीक्षा",".佛山",".集团",".在线",".한국",".ভারত",".八卦",".موقع",".বাংলা",".公益",".公司",".移动",".我爱你",".москва",".испытание",".қаз",".онлайн",".сайт",".срб",".бел",".테스트",".орг",".삼성",".சிங்கப்பூர்",".商标",".商店",".商城",".дети",".мкд",".טעסט",".中文网",".中信",".中国",".中國",".谷歌",".భారత్",".ලංකා",".測試",".ભારત",".भारत",".آزمایشی",".பரிட்சை",".网店",".संगठन",".网络",".укр",".香港",".δοκιμή",".إختبار",".台湾",".台灣",".手机",".мон",".الجزائر",".عمان",".ایران",".امارات",".بازار",".پاکستان",".الاردن",".بھارت",".المغرب",".السعودية",".سودان",".عراق",".مليسيا",".شبكة",".გე",".机构",".组织机构",".ไทย",".سورية",".рус",".рф",".تونس",".みんな",".グーグル",".世界",".ਭਾਰਤ",".网址",".游戏",".vermögensberater",".vermögensberatung",".企业",".مصر",".قطر",".广东",".இலங்கை",".இந்தியா",".հայ",".新加坡",".فلسطين",".テスト",".政务",".wv.us",".wy.us",".xj.cn",".xxx",".xyz",".xz.cn",".yachts",".yandex",".ye",".yoga",".yokohama",".youtube",".yn.cn",".yt",".yu",".za",".za.com",".zip",".zj.cn",".zm",".zone",".zr",".zuerich",".zw"); function checkUrl($url, $domains) { $url = trim($url); if (parse_url($url, PHP_URL_SCHEME) && strpos($url, ".") !== false) { $suffix = end(explode(".", $url)); if (in_array(".$suffix", $domains)) { return true; } else { return false; } } else { return false; } } //usage $sample_urls = array( "http://phpfreaks.com", "phpfreaks.com", "http://phpfreaks.blah", "http://phpfreaks.com.blah" ); foreach ($sample_urls as $url) { if (checkUrl($url, $domains)) { echo "<p style='color:green;'> $url </p>"; } else { echo "<p style='color:red;'> $url </p>"; } } ?>
  6. Does any of your data get truncated in mysql? I notice most have 20 characters while some have 16
  7. There is a lot of outdated, incorrect or just snippets from the manual for tutorials on the net both free and paid. I've seen a lot of them, mostly for amusement or seeing how bad they are. You want to visit the manual at php.net which is always current and will even find contributed examples. Otherwise can get a recent reputable php book, which again is referring to the manual but in their own words and practices. When I learned php there was not any schools, books or online tutorials for it. I'm actually glad in that respect because I feel I learned the right way. I started here, read everything (some a few times), tried to absorb as much as can and frequently went back or researched something specific when needed it. After a while it all sinks in and will see yourself visiting there less often. Although is good to go there once in a while to see if anything has changed. It takes a while to really learn php, all the functions, when and how to implement them, some creativity and imagination at times. The good thing for you is can come here to the forums and ask any question or help with some code, many would be glad to assist you. Two posts here that may help you once you learn a little. suggestions/do and don't list http://forums.phpfre...s-heres-a-list/
  8. My next post I answered that, don't echo out the time portion. Here is an example using your code you posted. <?php } ?> <span><?php echo esc_attr($start_date); ?></span> <?php } ?>
  9. That looks like the script to get data from the database to generate the document. Need the form or script that inserts data to database and your database structure would help as well.
  10. Yeah that sucks, I know a lot are limited to 5.4 as well, these hosting places need to get on the ball.
  11. Something like this UPDATE `ipb_core_members` SET `signature` = replace(signature, "<p style=\"text-align:center;\"> </p>", '')
  12. Good luck on your project, hard to beat something like laravel. You are going to need a lot more help or time to get this mature and stable enough for lots wanting to commit to it.
  13. I think I know what you need after reading the title and also post a few times. echo "<span>" . esc_attr($start_date) . "</span>";
  14. Nobody answered most likely because how much a mess the code was and a little bit more explanation needed as well. Get date from where exactly? I see some there now. <?php $event_start_date = get_post_meta(get_the_ID(), 'event_start_date', true); $event_start_time = get_post_meta(get_the_ID(), 'event_start_time', true); $event_location = get_post_meta(get_the_ID(), 'event_location', true); if (!empty($event_start_date)) { global $redux_demo; if (isset($redux_demo['events-date-format'])) { $time_format = $redux_demo['events-date-format']; if ($time_format == 1) { $start_unix_time = strtotime($event_start_date); $start_date = date("m/d/Y", $start_unix_time); } elseif ($time_format == 2) { $start_unix_time = strtotime($event_start_date); $start_date = date("d/m/Y", $start_unix_time); } } else { $start_unix_time = strtotime($event_start_date); $start_date = date("m/d/Y", $start_unix_time); } global $redux_demo; if (isset($redux_demo['events-time-format'])) { $time_format = $redux_demo['events-time-format']; if ($time_format == 1) { $start_time = esc_attr($event_start_time); } elseif ($time_format == 2) { $start_time = date("H:i", strtotime($event_start_time)); } } else { $start_time = esc_attr($event_start_time); } echo "<span>" . esc_attr($start_date) . esc_attr($start_time) . "</span>"; } ?> I especially do not understand why this multiple if/elesif/else statement 1,2 and default are all exactly the same. if ($time_format == 1) { $start_unix_time = strtotime($event_start_date); $start_date = date("m/d/Y", $start_unix_time); } elseif ($time_format == 2) { $start_unix_time = strtotime($event_start_date); $start_date = date("d/m/Y", $start_unix_time); } } else { $start_unix_time = strtotime($event_start_date); $start_date = date("m/d/Y", $start_unix_time); }
  15. It wasn't clear if you added the check for $_POST['new_key'] for new post values, you would add that in the if empty errors statement. That only checks for empty and not any validation whatsoever. The javascript Validator function is not a good way to do this, should always validate server side, not client side. If want to do additional checks client side that's fine, but don't rely on it. I added the message in the function to be required. <script language="JavaScript"> // Code for validating the form // Visit http://www.javascript-coder.com/html-form/javascript-form-validation.phtml // for details var frmvalidator = new Validator("contactform"); frmvalidator.addValidation("name","req","Please provide your name"); frmvalidator.addValidation("email","req","Please provide your email"); frmvalidator.addValidation("email","email","Please enter a valid email address"); frmvalidator.addValidation("message","req","Please write your message"); </script> You have an $email_body variable, you can add what you need there additional $email_body = "You have received a new message. ". " Here are the details:\n Name: $name \n Email: $email_address \n Message \n $message"; You can also do concatenation with an assignment operator $email_body = "You have received a new message. ". " Here are the details:\n Name: $name \n Email: $email_address \n Message \n $message"; $email_body .= "Additional information here \n"; You can post into Job Offerings if want to hire someone Here is a form I did for another person you can try. <?php $msg = '';//keep empty $to ='my email address';//your email $captcha_key = '';//place google captcha key here if have one if (isset($_POST['submit'])) { $errors = array(); if (isset($_POST['name']) && trim($_POST['name']) != '') { $name = trim($_POST['name']); } else { $name = ''; $errors[] = 'name'; } if (isset($_POST['email']) && filter_var(trim($_POST['email']), FILTER_VALIDATE_EMAIL)) { $email = trim($_POST['email']); } else { $email = ''; $errors[] = 'email'; } if (isset($_POST['subject']) && trim($_POST['subject']) != '') { $subject = trim($_POST['subject']); } else { $subject = ''; $errors[] = 'subject'; } if (isset($_POST['message']) && trim($_POST['message']) != '') { $message = trim($_POST['message']); } else { $message = ''; $errors[] = 'message'; } if(!empty($captcha_key)){ if(isset($_POST['g-recaptcha-response'])){ $captcha=$_POST['g-recaptcha-response']; } if(!$captcha){ $errors[] = 'captcha'; } else { $response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$captcha_key."&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']); if($response.success==false){ $errors[] = 'captcha'; } } } if (empty($errors)) { $msg = "Form was submitted"; $email_subject = "Contact form submission: $name"; $email_body = "You have received a new message. \n Here are the details:\n"; $email_body .= "Name: $name \n"; $email_body .= "Email: $email \n"; $email_body .= "Subject \n $subject \n"; $email_body .= "Message \n $message"; $headers = "From: $to\n"; $headers .= "Reply-To: $email_address"; mail($to,$email_subject,$email_body,$headers); //redirect to the 'thank you' page header('Location: contact-form-thank-you.html'); exit; } else { $msg = "<p style='color:red;'>You have the following errors:" . implode($errors, ", ") . "</p>"; } } ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Contact Form</title> <?php if(!empty($captcha_key)){ echo "<script src='https://www.google.com/recaptcha/api.js'></script>"; } ?> <style> *:focus { outline: none; } body { font: 14px/21px "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif; max-width:99%; } .wrap{ position:relative; width:75%; margin-left:auto; margin-right:auto; padding:5px; } ul{ list-style-type: none; padding:0; margin:0; } .contact_form h2, .contact_form label { font-family:Georgia, Times, "Times New Roman", serif; } .form_hint, .required_notification { font-size: 11px; } .contact_form ul { width:750px; list-style-type:none; list-style-position:outside; margin:0px; padding:0px; } .contact_form li{ padding:12px; border-bottom:1px solid #eee; position:relative; } .contact_form li:first-child, .contact_form li:last-child { border-bottom:1px solid #777; } .contact_form h2 { margin:0; display: inline; } .required_notification { color:#d45252; margin:5px 0 0 0; display:inline; float:right; } .contact_form label { width:150px; margin-top: 3px; display:inline-block; float:left; padding:3px; } .contact_form input { height:20px; width:300px; padding:5px 8px; -moz-transition: padding .25s; -webkit-transition: padding .25s; -o-transition: padding .25s; transition: padding .25s; } .contact_form textarea { padding:8px; width:300px; -moz-transition: padding .25s; -webkit-transition: padding .25s; -o-transition: padding .25s; transition: padding .25s; } .contact_form button { margin-left:156px; } .contact_form input, .contact_form textarea { padding-right:30px; border:1px solid #aaa; box-shadow: 0px 0px 3px #ccc, 0 10px 15px #eee inset; border-radius:2px; } .contact_form input:focus, .contact_form textarea:focus { background: #fff; border:1px solid #555; box-shadow: 0 0 3px #00FF00; padding-right:70px; } /* Button Style */ button.submit { background-color: #68b12f; background: -webkit-gradient(linear, left top, left bottom, from(#68b12f), to(#50911e)); background: -webkit-linear-gradient(top, #68b12f, #50911e); background: -moz-linear-gradient(top, #68b12f, #50911e); background: -ms-linear-gradient(top, #68b12f, #50911e); background: -o-linear-gradient(top, #68b12f, #50911e); background: linear-gradient(top, #68b12f, #50911e); border: 1px solid #509111; border-bottom: 1px solid #5b992b; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; box-shadow: inset 0 1px 0 0 #9fd574; -webkit-box-shadow: 0 1px 0 0 #9fd574 inset ; -moz-box-shadow: 0 1px 0 0 #9fd574 inset; -ms-box-shadow: 0 1px 0 0 #9fd574 inset; -o-box-shadow: 0 1px 0 0 #9fd574 inset; color: white; font-weight: bold; padding: 6px 20px; text-align: center; text-shadow: 0 -1px 0 #396715; } button.submit:hover { opacity:.85; cursor: pointer; } button.submit:active { border: 1px solid #20911e; box-shadow: 0 0 10px 5px #356b0b inset; -webkit-box-shadow:0 0 10px 5px #356b0b inset ; -moz-box-shadow: 0 0 10px 5px #356b0b inset; -ms-box-shadow: 0 0 10px 5px #356b0b inset; -o-box-shadow: 0 0 10px 5px #356b0b inset; } input:required, textarea:required { background: #fff; border-color:#FF0000; } .contact_form input:required:valid, .contact_form textarea:required:valid { /* when a field is considered valid by the browser */ background: #fff; box-shadow: 0 0 5px #5cd053; border-color: #28921f; } .form_hint { background: #d45252; border-radius: 3px 3px 3px 3px; color: white; margin-left:8px; padding: 1px 6px; z-index: 999; /* hints stay above all other elements */ position: absolute; /* allows proper formatting if hint is two lines */ display: none; } .form_hint::before { content: "\25C0"; /* left point triangle in escaped unicode */ color:#d45252; position: absolute; top:1px; left:-6px; } .contact_form input:focus + .form_hint { display: inline; } .contact_form input:required:valid + .form_hint { background: #28921f; } .contact_form input:required:valid + .form_hint::before { color:#28921f; } </style> </head> <body> <div class="wrap"> <form class="contact_form" action="" method="post" name="contact_form" novalidate> <ul> <li> <h2>Contact Form</h2> </li> <?php echo $msg;?> <li> <label for="name">Name:</label> <input id="name" name="name" type="text" value="<?php echo $name;?>" required/> </li> <li> <label for="email">Email:</label> <input id="email" name="email" type="email" value="<?php echo $email;?>" required/> <span class="form_hint">Proper format "name@domain.com"</span> </li> <li> <label for="subject">Subject:</label> <textarea id="subject" name="subject" cols="40" rows="4" required><?php echo $subject;?></textarea> </li> <li> <label for="message">Message:</label> <textarea id="message" name="message" cols="40" rows="4" required><?php echo $message;?></textarea> </li> <?php if(!empty($captcha_key)){ echo "<div class='g-recaptcha' data-sitekey='".$captcha_key."'></div>"; } ?> <li> <button class="submit" type="submit" name="submit">Submit Form</button> </li> </ul> </form> <div> </body> </html>
  16. If you meant ecommerce opencart and prestashop are popular
  17. Need to raise your memory limit in the working php.ini file or set it top of the script. Not sure how much memory you have available. php.ini memory_limit = 256M top of script ini_set('memory_limit', '256M');
  18. Could be added up attempts until is logged your server or max attempts that session. Ban them longer than an hour would probably help as well.
  19. What language are you more comfortable with or going to be using? Depends what you really want to parse, data trying to get, cleaned html, possibly works better but then maybe not, having more control or not. That list is a lot of third party premade classes or applications and parsed how they deemed it. I suppose can extend onto those classes more if willing to study them a while. If you want to do it directly and have control of what gets parsed along with output...use DOM, SimpleXML, for anything malformed or not within tags you can do preg_match / preg_match_all with some regex As far as I know is not one complete solution that does every document type and also everything within the document let alone handle malformed data well, you have to make your own most of the time or learn to embrace errors. I know this because I had to make a universal website,page,document,media parser using the above methods. EDIT: Another suggestion is to use curl and follow any redirects including javascript. If you use anything else ensure is a protocol and create a stream context or can fail easily with the connection.
  20. It's not good to do ORDER BY RAND() especially if have many rows, even if properly indexed is slow. It's only 15 latest results so wouldn't matter much either way.
  21. As of right now all should as the latest XAMPP uses php version 5.6.12, in future versions of php mysql_* functions will be gone, right now are deprecated. Use mysqli_* or pdo I doubt it's your issue, save your database and try a reinstall. You can copy your databases inside the mysql folder directly in the application, then place them back after reinstall.
  22. Why use the xml version and convert to json when you can use the json one and use that? http://api.wunderground.com/api/KEY/geolookup/conditions/q/us/$city.json json_decode() object $results = json_decode($data); array $results = json_decode($data,true); <?php $key = "your key"; if (isset($_POST['city'])) { $city = $_POST['city']; } else { $city = 'New York'; } $results = file_get_contents("http://api.wunderground.com/api/$key/geolookup/conditions/q/us/$city.json"); header('Content-Type: application/json'); echo $results; ?>
  23. Tip of the day: HTTP referer - The word referer is mispelled in most coding and should have been referrer. Although some spell it correctly such as any using DOM.

  24. Noticed an extra comma here $output[] = array($time[0], $temperature[0], $current[0],$wind[0],);
×
×
  • 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.