Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by emptry

  1. I am trying to make a multi preg_replace, not sure if thats the correct function. I want this outcome [link]www.mynewhomepage.com(My new homepage)[/link] to become <a href=mynewhomepage.com>My New homepage</a> I have made this code, which dosent give me what i want $string = 'i have made a new homepage visit [link]http://myhomepage.dk(My New homepage)[/link]'; $find = array('#\[link\](.+)\[\/link\]#iUs', '#\((.+)\)#iUs'); $replace = array('<a href=$1>', '</a>'); $result = preg_replace($find, $replace, $string); echo $result; And it give me this outcome: http://myhomepage.dk> Can anyone guide me or help me in the right direction of what i am doing wrong? :) Thanks and happy summer for you :) preg-replace
  2. Yiir, is that the right way to code a homepage?
  3. what about all my content in the front, category, product.php? So i should breakup index.php into header.php menu.php and include them to each page ?
  4. index.php contains: "basic script, java and php" In this file i also have standard meta, index.follow, author, copyright.. all the meta tags which is not unique. Then i got html output.. Header menu INCLUDE FILE footerinfo fotter So they are the same for each page. When i include a page, eks. front.php i got this as the first in the file <title>Kvalitetsprodukter til underpriser - Dagenshug</title> <meta name="keywords" content="dagenshug, dagens, dagens hug, deals, tilbud"> <meta name="description" content="Dagenshug tilbyder salg af kvalitetsprodukter til underpriser, nyt tilbud hver dag og uden at gå på kompromis med kvaliteten"> and then some php script and then the HTML output. a new section.. When i include category.php i got: <title>Udsalgsprodukter til skarpe priser! - Dagenshug.dk</title> ...... and so on..
  5. I found the bug I was include("googleanalystic.php") in my file at the very top, so i got "script" tag before the header .. i have alle my php code <?php bla bla bla ?> and then <head> </head> <body> in my body i am including alle my page byt the $_GET['site].php ..and i all php files eks. produtcs.php, category.php i got <title> and <meta description> - That's not good, if remove them from the php files and put them in the index.php, how i change title and descript when the user go to a new php file? .. omg, that was a bad explaning, do you understand my friend ?
  6. But what is the error ? .. eks. it displays an error on my doctype ? .. which I found correct ?
  7. Jacques1: Sorry my friend, i do not agree with you. I'm using mysqli, with great succes, and i dont find it complicated, how come you think that ?
  8. Hello, Do we have a SEO epert among us? if so, can you help me with som basic SEO? - My page is not being showed on "Ceramide Capsules" when i using this checker https://serps.com/tools/rank-checker/ it can't find it.. https://dagenshug.dk/produkt/Elizabeth-Arden-Ceramdie-Capsule none of my products can be find, and if you seach on my company name "Dagenshug" Then i'm nr. 4 ! What i'm a doing wrong ? ..
  9. haha my friend. i havn't made the script, because i dont know how i should make it I can make it so it will store every single letter.. but that's not what i want But here is my code for the live search $(function() { $("#searchword").keyup(function(){ var text = $(this).val(); if (text != ' ') { $('#result').html(" "); $.ajax({ type: 'post', url: 'livesearch.php', data: { 'search': text }, success: function(dataReturn) { $('#result').html(dataReturn); } }); } }); }); And in my PHP $s = mysqli_query($mysql_link, "SELECT * FROM dagenshug_product WHERE product_name LIKE '%".$_POST['search']."%'"); while ($search_result = mysqli_fetch_array($s)) { print_r($search_result['product_name']); }
  10. Hello Freaks, I working on a little snippet, a live search with MySQL. Now i think it could be nice to store/save which searchword the user, did the search on. Example: User search on My new book Then i want to store that to my databse. The problem is with my script right now, where i trig the ajax on keyup. Then it will store. M My My My N My Ne...... and so on, how can i come around this and only store the hole line ..?
  11. Problem sovled! - Clearing the browser.. totaly! helped .. so now it works
  12. I just visit the site with a different browser.. and ... NO PROBLEMO! ! WHAT ! So i think i need to empty the cache in Chrome ? ... but, then hit CTRL+F5, then it shoudl empty the cache, right ?
  13. is the coloum int ? With html ? .. I would use php and echo/print it
  14. Yes the url redirect too https://dagenshug.dk/404 That's my landing page when i hit https://dagenshug.dk/produkter/Ham I have tryed close and start broswer again.. delete cookies.. CTRL+F5 ...
  15. I just tried it right now.. again ....
  16. The non friendly url is working fine .. but ... I am redirected to 404 on this one: https://dagenshug.dk/produkter/Hende
  17. .. like that .. yes .. But try hit the link below .. https://dagenshug.dk/produkter/asd and then hit https://dagenshug.dk/produkter/Ham or https://dagenshug.dk/produkter/Hende ....
  18. I just think it is wierd that some of them is working and others are not... what do you mean by letting php handle it ?
  19. Hello Freaks! I have som problems with a rewrite rule, hope u can help me. I can visit: https://dagenshug.dk/produkter/Begge https://dagenshug.dk/produkter/Him https://dagenshug.dk/produkter/Her even this! https://dagenshug.dk/produkter/asdasdasdasd But if i want to visist https://dagenshug.dk/produkter/Ham OR https://dagenshug.dk/produkter/Hende Then i dont work, and i'll be redriected to 404 :S .. How come ? - It is the same code i am using.. Options +Indexes +FollowSymLinks -MultiViews RewriteEngine On #SSL REDIRECT RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} #404 REDIRECT ErrorDocument 404 https://dagenshug.dk/404/ RewriteCond %{REQUEST_URI} ^/404/$ RewriteRule ^(.*)$ index.php?page=404.php [L] #SEO FRIENDLY CODES RewriteRule ^home index.php [NC,L] RewriteRule ^kontakt index.php?page=contact.php [NC,L] RewriteRule ^gevinst index.php?page=campaign.php [NC,L] RewriteRule ^tak-for-handlen index.php?page=checkout-finish.php [NC,L] RewriteRule ^endnu-engang-tillykke index.php?page=campaign-finish.php [NC,L] RewriteRule ^gevinst index.php?page=campaign.php [NC,L] RewriteRule ^Dagenshug index.php?page=dagenshug.php [NC,L] RewriteRule ^Kundeservice/([0-9a-zA-Z]+) index.php?page=customerservice.php#$1 [NC,L] RewriteRule ^Kundeservice index.php?page=customerservice.php [NC,L] RewriteRule ^Om-dagenshug index.php?page=about.php [NC,L] RewriteRule ^kurv/([0-9a-åA-Å_-]+)/([0-9a-åA-Å_-]+) index.php?page=cart-controller.php&product_number=$1&size=$2 [NC,L] RewriteRule ^kurv/([0-9a-åA-Å_-]+) index.php?page=cart-controller.php&product_number=$1 [NC,L] RewriteRule ^kurv index.php?page=cart.php [NC,L] RewriteRule ^produkter/([0-9a-åA-Å_-]+)/([0-9a-åA-Å_-]+) index.php?page=category.php&category_sex=$1&category_name=$2 RewriteRule ^produkter/([0-9a-åA-Å_-]+) index.php?page=category.php&category_sex=$1 [NC,L] RewriteRule ^produkt/([0-9a-åA-Å_-]+) index.php?page=product.php&product_url_link=$1 [NC,L] RewriteRule ^kassen opc-checkout.php [NC,L] RewriteRule ^mail/ mail-order-confirm.php [NC,L] RewriteRule ^nyheder index.php?page=blog.php [NC,L]
  • 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.