Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Server Side

This forum is dedicated to Server-Side development including: PHP, Node.js, Ruby, Go, Databases etc.

  1. Hi Gang, Bit of a weird one, hoping someone can help. I've a 1 hour gap (UTC/BST) between SQL and PHP. $q = "UPDATE `table` SET `updated` = NOW() WHERE `id` = ?"; // SQL table updates correctly with BST e.g. 2017/04/07 09:42:00, however the following at the same time... echo date("Y-m-d H:i:s"); // This shows 2017/04/07 08:42:00 which is UTC. Might be a bit green here, I always thought SQL time and php time would be the same as it would use system clock or am I missing something? Cheers. Edit: So I made a function for displaying current London time. function londonTime() { $a = new DateTime("now", new DateTimeZone("Europe/London")); $a->setTimestamp(ti…

    • 4 replies
    • 2.5k views
  2. At the moment this search script is working pretty well. However, how should I stop a single space from triggering all of the other search results because they have a space in them? if ($something == ' ') ? The script is below and you can test it here in the search field. <?php $to = "myemail@hotmail.com"; $subject = "Unfound Search Query"; $body = $_POST['search']; include("dbconnect.php"); if(!isset($_POST['search'])) { header("Location:index.html"); } $sql="SELECT * FROM text WHERE item LIKE '%".$_POST['search']."%'"; $qry=mysqli_query($dbconnect, $sql); if(mysqli_num_rows($qry)>0) { $rs=mysqli_fetch_assoc($qry); } if(mysqli_num_rows($qry)>0…

  3. I'm having trouble setting up reCaptcha on a form that's already in place. Every guide I'd ever seen (and I've been googling about 20 of them!) Seem to assume I'm proficient at coding, however I'm a little lot, and at ever single guide I completely hit a wall when it comes to server-side integration, to verify the response. The Guide just says That's all. then lists my codes. With all the other stages it was step-by-step, paste this bit into your header, etc etc. Suddenly they give no guide at all! Or am I missing something? I've got he recaptcha to show up, and it turns to a nice tick when I click it, however it still send the form, even if I haven't clicked it! …

    • 2 replies
    • 2.2k views
  4. Hi all, I'm building an application & it has some data I need to load into it once the page has loaded, so I do this after loading using Ajax / XMLHttpRequest originalPage.php - the user loads this httpreqPage.php - originalPage requests information from this using XMLHttpRequest - I only want htmlreqPage to display this data when originalPage requests it - i.e. if any other web page tried to access it, or if the user tries to access the page directly - it will display no information. Is there a simple and safe way to do this? My current thoughts are to generate a random password when loading originalPage - store this in a PHP Session & to send it with the…

    • 3 replies
    • 1.2k views
  5. Started by danbingham,

    Hi Folks, I have form set up here - http;/drivingsupercars.com. When a user 'sends the form' it displays error, and I am not sure exactly why this is. The data is captured, and I am not sure if there is something i need to do to tweak the contact script. The current script is as below: <?php $ToEmail = 'dan@definitelydomains.com'; $EmailSubject = 'DrivingSupercars'; $mailheader = "From: ".$_POST["email"]."\r\n"; $mailheader .= "Reply-To: ".$_POST["email"]."\r\n"; $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; $MESSAGE_BODY = "Name: ".$_POST["name"].""; $MESSAGE_BODY .= "Email: ".$_POST["email"].""; $MESSAGE_BODY .= "Offer: ".nl2b…

    • 1 reply
    • 1.1k views
  6. Started by danbingham,

    Hi Folks, I am using a modal form and im having some issues in getting the form to send data. See here - http://bucketboats.com. The contact script I am using is as follows - <?php $ToEmail = 'dan@definitelydomains.com'; $EmailSubject = 'BucketBoats'; $mailheader = "From: ".$_POST["email"]."\r\n"; $mailheader .= "Reply-To: ".$_POST["email"]."\r\n"; $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; $MESSAGE_BODY = "Name: ".$_POST["name"].""; $MESSAGE_BODY .= "Email: ".$_POST["email"].""; $MESSAGE_BODY .= "Offer: ".nl2br($_POST["offer"]).""; mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); ?> …

  7. Started by danbingham,

    Hi Folks, I am having some issues in getting our form to work, and I am hoping someone can help. I have used a customised script which I have altered but am still experiencing issues in getting the form to work once a user clicks on 'send message' button. Is there a simple script i can upload and change, or is there something I need to change to the existing script - see below. Any help or advice would be appreciated. <?php /* Set e-mail recipient */ $myemail = "dan@definitelydomains.com"; /* Check all form inputs using check_input function */ $name = check_input($_POST['Name']); $email = check_input($_POST['Email']); $offerinquiry = check_input($_POST['O…

  8. Hi all. I'm not a PHP person so please bear with me. I need to remove eregi() and replace it with preg_match(). The line that needs updating is: return (eregi("\r", $s) || eregi("\n", $s) || eregi("%0a", $s) || eregi("%0d", $s)) ? TRUE : FALSE; Would the following be correct and achieve the same as the above? return (preg_match("/\r/i", $s) || preg_match("/\n/i", $s) || preg_match("/%0a/i", $s) || preg_match("/%0d/i", $s)) ? TRUE : FALSE; As you can see, I've just added delimiters and a trailing 'i', but I'm not sure whether I need to escape anything, bearing in mind it's using double quotes. If anyone can point me in the right direction I'd appreciate it. …

    • 1 reply
    • 1.2k views
  9. Started by jovica_raicki,

    Does anyone have experience with typing fiscal receipts, using web applications written in php / mysql, html, css. javascript and whether it is possible to connect a fiscal printer with such type of application? The application must use RS 232 serial port (COM1, COM2 ...) in order to achieve a connection to the printer, and must be initiated through a local server (XAMPP).

    • 0 replies
    • 1.3k views
  10. Started by lozenges,

    OK so I was getting the header already sent error: Warning: Cannot modify header information - headers already sent by (output started at /home/index.php:22) in /home/public_html/index.php on line 2218 I turned on output_buffering in the php.ini file and now the error does not show, and it redirects to the new page, however the email the script is supposed to send doesn't come through. Any ideas why this would be? The server does support php mail as I have tested this to make sure. The PHP code is below I am still learning php so please excuse me if there are things that aren't done correctly. I have highlighted line 22 and 2218 if this helps at all... <?php $…

    • 0 replies
    • 1.2k views
  11. Started by chephei,

    Hey guys, im here for ask, how to create vouchers at my website, i need use html or php? Thank u

    • 0 replies
    • 1.3k views
  12. I have my menu in an include file called menu.php and I want to assign a class called 'active' to the <li> to the page that I am on. How can I do this in PHP? <!-- navigation --> <nav class="navbar navbar-default" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="collapse navbar-collapse" id="collapse"> <ul class="nav …

  13. Ok I'm working a project and need to setup TInyMCE to edit HTML content pulled from MariaDB/MySQL. The flow is as follows :- 1> PHP pulls the raw HTML from MariaDB/MySQL (works fine) 2> PHP echos the raw HTML into a $scope variable in the AngularJS HTML code (this causes a problem depending on the content of the raw HTML ). 3> AngularJS passes the raw HTML via $scope to tinyMCE. Problem: When the the raw HTML contains quotes or line-breaks it breaks the AngularJS $scope HTML for example:- Source code: $scope.rawhtml = "<?php echo $rawhtml; ?> Example HTML output: $scope.rawhtml = "<p>Test Image <image src…

    • 4 replies
    • 1.3k views
  14. Started by army93,

    Hi guys, my client ask me if it is possible to convert his website (old site, html4 and css) to edit it when he wants making it easy for him. Someone suggested me to write it in php,but i don't know not even where I Should to begin, do you have any solution ? The principal motivation of this question is: he want to a website easy to edit when he wants. My question is: it is possible to realize this, without touch the original site (code) ? Do you know some application/software that can do it ? Or i must rewrite all site from zero with Wordpress ? Thanks in advance to all. P.S. I don't know if this is the correct section for this question, in the case i'm sorry for the err…

    • 4 replies
    • 1.8k views
  15. HI, Please could anyone give me some advice on how to host multiple python appson a vps. I want to start selling websites and I want to know how to best go about it. I've created an app in flask that uses flask on the backend and nginx for the static files but I don't want the customers to have my code I just want to give them an admin panel and no cpanel. I was thinking of using ovh because it would be easy to scale but I need some sort of dashboard for myself to manage all of my costumers payments and websites etc. Any advice would be deeply appreciated thank you

    • 0 replies
    • 976 views
  16. Started by predatorx,

    Hello I have a domain which is hosted on 1and1.co.uk and I have set up an email inbox there. The issue I am having is that when I send emails from this inbox, they always go to the spam/junk folder of the recipent. I set up an SPF record which they gave me, but it doesn't seem to work and to be honest I'm not sure what this does. If I change my MX records to use Google, do you think this will stop the issue? Any advice would be helpful. Thanks

    • 4 replies
    • 2.2k views
  17. Started by AndyDesigns,

    Hi, I'm using materialize.css (http://materializecss.com/modals.html) to display a modal/pop-up Form on page load. I have the modal displaying fine and submitting data via PHP. However, I want the pop-up to just close after submit instead of the user being redirected to another page. I've tried having it redirect back to the current page but this re-opens the pop-up again. Below is my PHP: <?php $email_to = "mail@domain.co.uk"; $name = $_POST["name"]; $email_from = $_POST["email"]; $tel = $_POST["tel"]; $message = $_POST["message"]; $email_subject = "Feedback from website"; $headers = "From: " . $email_from . "\n"; $headers .= "Reply-To: " . $email_fro…

    • 6 replies
    • 1.2k views
  18. Hello all, I'm new to Laravel and I'm trying to set it up with my WAMP server. I've downloaded composer and vagrant as well as homestead I've installed them using the cmd line and I've generated my private and public keys. When I get to the stage were I open homestead.yaml and type in where my 'virtualboxauthorize' , 'keys' and 'folders' are I can't seem to get it. I've updated the following: virtualboxauthorize: c:/Users/User/.homestead/id_rsa.pub The .homestead folder is located inside the 'User' folder. keys: - c:/Users/User/.homestead/id_rsa Again the .homestead folder is situated inside my 'User'. Although I have my key files saved using PuTTY Key ge…

    • 2 replies
    • 1.5k views
  19. I'm hoping someone here can help me? I'm trying to create a simple web app for my own local use (i.e. not necessarily to publish to the web) that contains: - A table of data populated by a php query to a mysql database - Some bootstrap toggle buttons along the top that when pressed, filter the table contents At the moment I'm working on the assumption that I will use the toggle buttons to change the WHERE clause in the mysql query and then refresh the page automatically so that only relevant records are returned from the database. My problem is that I have absolutely no idea how to achieve this, to the point where my google searching isn't helping because I'm not sure…

    • 5 replies
    • 3.6k views
  20. Started by Dredd2000,

    Hello all, I'm trying to install PHP5.6.9 on my wamp 2.2 as the old version of php does not support magento or laravel. I've copied the new php folder inside the php folder stored inside wamp and changed the php.ini to include: the extension_dir = "c:/wamp/bin/php/php5.6.29/ext/" and the zend_extension = "c:/wamp/bin/php/php5.6.29/zend_ext/php_xdebug-2.1.2-5.3-vc9.dll" I've also changed the .httpd.conf to include: LoadModule php5_module "c:/wamp/bin/php/php5.6.29/php5apache2_2.dll" I also copied the phpForApache.ini and changed that extension_dir = "c:/wamp/bin/php/php5.6.29/ext/" Although I had to copy the phpapache2_2.dll from my older version a…

    • 0 replies
    • 1.4k views
  21. Started by -Matthew-,

    Hello, Does anyone know what this error could mean; Error: 0 - php_network_getaddresses: getaddrinfo failed: Name or service not known Best regards, Matt

  22. I started looking for a wordpress plugin that would allow me to publish a post to a Facebook group, also if I wrote a post in that facebook group my wordpress could create a post based on it's details. I'm fairly certain I did this with Facebook Pages and my User profile at some point. Looking at the plugins they all mostly seem to be very old / not updated much. Looking at the Facebook API there were some big changes in October 2016 relating to groups. It is my understanding that I can't publish via facebook.com/group/{group-id} and I have to use an app? The API pages point me to use a different "edge" what is an "edge"? I understand a bit about SOAP and REST c…

    • 0 replies
    • 1.1k views
  23. Hello, I am trying to create a project which I have two tables- one table stores projects and the other table stores the project id's and the user ids of the users assigned to them. Multiple users can be assigned to a project. For example user id 1 might be assigned to project id 5 user id 2 might be assigned to project id 5 I want to then grab all the projects assigned to that particular user and echo out the data stored in the projects table. I am using PDO just having issues doing this - I can grab all the data individually so for example I can grab all the projects assigned to a particular user on the project id's and user id's table just not both t…

  24. Hello, I went through all the links available in Google but didn't found any correct solution. Please help the noob here. Also if you find that I am thinking totally in a wrong way then please suggest the correct way. I want to know that how thing is actually done. I have created two tables so that I can do RDBMS (Data Normalization and Joining). Here is my code: <?php require("conn.php"); // Escape user inputs for security $name = mysqli_real_escape_string($conn, $_POST['name']); $desc = mysqli_real_escape_string($conn, $_POST['desc']); $cars = mysqli_real_escape_string($conn, $_POST['cars']); $gender = mysqli_real_escape_string($conn, $_POST['gender']); $bik…

    • 2 replies
    • 1.3k views
  25. Hello all, I'm currently converting text from a file and then converting it to an array to display in my browser. I can get the data from the file and using a foreach loop I can convert it into an array, however, I need to convert each word into an array. At the moment I can only convert each line into an array, this line needs to be split up into a name, number and price. For example here's some sample data: John@yahoo.com:7:8.35 Fred@hotmail.com:4:5.59 geoff@gmail.com:3:9.29 I can convert each line in an array but each element must be inserted into its own td inside a table. At the moment I can put each line into a table row but I need to split each el…

  26. Started by mr108,

    Hello, I'm helping a friend with her WordPress website and the portfolio display on a that site most likely has a bug. The site is here: http://terrybraunstein.com/portfolio1/ When you select one of the Portfolio Categories, e.g. 'Sculpture' (last on the right) and click on the second item from the top-left ('Ladder Dreams') and once it opens, if you click on the 'Next' button in the top-right corner to view next item in the 'Sculpure' category, then completely unrelated item from 'Artists Books' category comes up - ('My Bookhouse:...'). And if you click on 'Previous' button instead when viewing 'Ladder Dreams' then 'Empty Nest – 1988' which is from 'Photography' Catego…

    • 6 replies
    • 1.2k views
  27. I have $pageSource = mysql_query("SELECT * FROM pmkArticles WHERE category = '$directory1'"); I have a field where category is empty and if $directory1 is empty it does not read that field. Why?

  28. Started by drennan,

    Hey all, I'm trying to get a php loop to display records descending by reference by using SELECT * FROM coll_grey order by ref desc But some numbers are into their thousands, so sorting by desc doesn't work. The results display something like this R997 R996 R995 R1002 Is there a way to get the 1002 to appear before the 997, so they are treated as real numbers? I guess it's only looking at the first few digits and maybe the R is causing a problem? Thanks guys

    • 2 replies
    • 1.2k views
  29. I've added a search box to my site in HTML and CSS, and I'm looking for a modern and secure script to make it work. (It's an Apache server, and the site is not a WordPress site.) The search box will be a typical website / blog search box, which will ideally list the closest relevant page or pages, based on those pages having similar words or content. (Like many sites obviously.) I'm new to this and wonder if it should work off of keywords, h1 headings, or the frequency or number count of words. What do you members use or recommend, and why, if possible, please? Would you recommend Google scripts for any reason?

  30. ​I'm currently learning PHP to build search box functionality. echo "Page: ".$rs['sitepage']; At the moment, I can echo 'sitepage' to bring up the string (url) that is written in the sitepage column of a table. How can I make the url clickable, so the user can click on it? Thanks for any help.

  31. Started by DevDream,

    How do I add php to button onclick? I dont wish to use jquery as i have been using javascript and i dont wanna complicate things and jqeury is all i could generally find. does it basically work the same way as in javascript, you make a function using php then call the function using inclick ? e.g. <?php function Myfunction() { } ?> <input type = "button" name="click here" onClick="return Myfunction()";> sorry for my n00b question haha

  32. hi everyone i've been using hubspot for my blog, so i create a subdomain blog.domain.com which redirected to my hubspot blog posts however, i am discontinuing with hubspot, and have reposted all my blog posts on my my domain www.domain.com i am trying to create a htaccess record to redirect all the old links to the new ones. something like: old address: blog.domain.com/(article slug) new address: www.domain.com/2016/10/29/(article slug) (yes the date is fixed and the same for all posts, i've created them all today) can someone help me with the htaccess record? thanx in advance!

    • 0 replies
    • 1.6k views
  33. Started by Seth,

    Hi I want to move my databases from Dreamhost to SiteGround. The new DB will have a new prefix than the one at Dreamhost. How can I change this EASILY in PHPMyAdmin? Sent from my XT1254 using Tapatalk

    • 0 replies
    • 867 views
  34. I must be missing something obvious. Can someone tell me why this php code won't work! if (file_exists("config.php")) { if (file_exists("cp.reg")) { header('Location: pads/default/'); } else { header('Location: pads/noreg/'); } } else { header('Location: pads/startup/'); } But if I take out the nested if it works fine. But I can't see any reference to the fact that you cannot nest file_exists statements? I realise I could rewrite to set a flag for one of the file exists but it seems less efficient. TIA Paul

  35. This was originally a small side project I made a while ago, purely just to show that chat applications can be made without Javascript or any other components such as Java or Flash. It’s not being used, so it will be good to share it on here. Screenshot: Things to note: This works by http streaming the chat through an iframe. This will stop working if the user choses to stop loading the page. This has only been tested locally on XAMPP. This script may be a bit buggy, as it hasn’t been rigorously tested. Uses the minimum amount of validation required for it to work. The naming of the php file does not matter. The chat frame will not automatically sc…

    • 8 replies
    • 11.9k views
  36. I did publish to a local file on my computer. When I tried to upload the files Compiled to my hosting using FileZilla, the project uploaded successfully but i get an error on the first page as below: HTML Code: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load the assembly 'App_Web_tuwlsmxq'. Make sure that it is compiled before accessing the page. Source Error: Line 1: <%@ page language="C#" autoeventwireup="true" inherits="welcome, App_Web_tuwlsmxq" %> Line 2…

    • 0 replies
    • 767 views
  37. Started by purple,

    Hi I\'ve been through the set up guide for SQL Server connections but my SQL Server is reporting the following errors continuously and Logic Monitor is retrieving no data. 01/10/2012 15:52:24,Logon,Unknown,Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. [CLIENT: 194.83.78.12] 01/10/2012 15:52:24,Logon,Unknown,Error: 18452, Severity: 14, State: 1. 01/10/2012 15:52:24,Logon,Unknown,SSPI handshake failed with error code 0x80090308, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the c…

  38. I did publish to a local file on my computer. When I tried to upload the files Compiled to my hosting using FileZilla, the project uploaded successfully but i get an error on the first page as below: HTML Code: Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load the assembly 'App_Web_tuwlsmxq'. Make sure that it is compiled before accessing the page. Source Error: Line 1: <%@ page language="C#" autoeventwireup="true" inherits="welcome, App_Web_tuwlsmxq" %> Line 2…

  39. Started by adsegzy,

    Hello Guys, Am developing a matches permutation betting App/Calculator in PHP. The user will have to enter the 2 possible outcomes on each match (win or not win) and combine as many matches as possible. Also will enter amount per bet (eg $10). Then the app will print out possible outcomes of the matches. I have form fields as below; I know this is a multidimensional array. The above give 8 ways of combinations. I want to collect these detail and convert them to a multidimensional array like below; $play = array ( 'Game 1' => array(1.75, 2.25), 'Game 2' => array(1.20, 3.50), 'Game 3' => array(2.50, 4.10) ); I got several php p…

  40. Hello, it;s been a while. I wonder if someone can help. I have some code. I'm attempting to connect to a database via SQLite. Actually the database always connects. I'm trying to trigger an exception in a try catch blog but no matter what I do (deliberately mispelling the database name) to trigger the exception, the connection message will always show up. Here's my code. <?php try { $db = new PDO("sqlite:" . __DIR__ . "/database.db"); var_dump($db); } catch (Exception $e) { echo "Unable to connect to the database"; exit; } echo "Connected to the database successfully"; ?> So what happens is instead of blocking the connection if I u…

  41. Started by tomanderson91,

    Hello guys and girls, I am working on a project and a feature would include a Marketplace in which users can submit their own work to sell and for others to buy, I was going to code this myself using PHP however its more advanced than anything I've tried before could someone please give me some pointers or starting areas ? Also is it a big task in which another already made script would be better using ? Regards, Tom.

  42. Started by jpeters8889,

    My Fiancee runs a fairly popular website for people with Coeliac (Gluten Intolerance), it gets on average 25,000 - 30,000 unique visitors per month, one of the more popular sections is the 'Where to Eat' guide, which currently lists almost 2000 independent places accross the UK that serve Gluten Free food. She has asked me to build a thumbs up system for the Where to Eat guide, where if a visitor likes the place they can press a litte button and it will say 'X people recommend this place'. I've been thinking through the logic in my head and its easy enough to build, however, none of visitors are registered users, the website doesn't have a user system, which then leav…

  43. Hello all, I'm using CodeIgniter and I'm attempting to upload video files. Here's my snippet of code for the view: <input type="file" name="userfile" class="userfile" /> And here's the snippet of code for the controller: $file_name = $_FILES['userfile']['tmp_name']; if(filesize($file_name) == 0) { exit('File does not exist!'); return FALSE; } I have an exact similair piece of code for my upload images file and it works fine, however, my video file upload just does not retrieve the file name or file size. I've googled everywhere but I can't find any answe…

  44. Started by tomanderson91,

    Hi everyone, I haven't done anything in PHP for a while, not done any website development for ages and finally getting back into it. I used to use the following in a config file. if (!ini_get('register_globals')) { $superglobals = array($_SERVER, $_ENV, $_FILES, $_COOKIE, $_POST, $_GET); if (isset($_SESSION)) { array_unshift($superglobals, $_SESSION); } foreach ($superglobals as $superglobal) { extract($superglobal, EXTR_SKIP); } } To which I would have a 'switch' on the page I am wanting to have multiple functions on switch($process) { case "checkLogin": valLogin($validate); break; default: Login($alert); break…

  45. Hi forum, Would anyone here be able to suggest a simple job search board that I can add to a website i'm building for my recruitment start up business. The website is based around bootstrap 3 and i'm not using wordpress. I've searched through google and looked at some options, but wondering if anyone has experience of setting up a job search board, that doesn't require advanced knowledge of databases etc? Thanks!

  46. Hello all, I've designed a controller that uploads videos from a file field into a folder on my WAMP server. However, when I try to display it in my web page I'm confronted with a message stating 'NO VIDEO WITH SUPPORTED MIME TYPE FOUND'. I've tried every plugin on every browser but I'm still getting the same message. I've even tried every HTML tag for video but none of them work. I've added these lines to my .htaccess file: AddType video/mp4 mp4 m4v AddType audio/mp4 m4a AddType video/ogg ogv AddType audio/ogg ogg oga AddType video/webm webm But my browsers still doesn't display them and I still get the same message. The…

    • 4 replies
    • 2.2k views
  47. Hello I have installed wordpress in a directory 'test-admin' (mydomain.co.uk/test-admin), unfortunately when I go to that it is redirecting to my 'newdomain' which I don't want it to, none of the other pages are redirecting, they all work fine. In the 'test-admin' directory I have the following htaccess: RewriteEngine On RewriteBase /test-site/ RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+…

    • 2 replies
    • 2.3k views
  48. Started by Brock,

    This script works fine, but there's a part I'm not sure if there's an easier / better way to do it. The part I'm talking about is commented in the script. Also any general advice on improvements if there are any to be would be cool. <?php if (isset($_POST['submit'])) { //Variables $name = Trim(stripslashes($_POST['name'])); $email = Trim(stripslashes($_POST['email'])); $id = rand(1000, 9999); //Headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: email@email.co.uk' . "\r\n"; $headers .= 'Cc: email@email.co.uk' . "\r\n"; //Email…

    • 1 reply
    • 1.6k views
  49. Started by Harrk,

    Hi all, I just had a phone interview with a pretty big company and I was asked if I have experience with high-traffic websites (10k active users~) to which I stated "No". At best I have experience with 110 active users (according to google analytics) which is more or less my current job. Thing is, I have no idea where to start learning about managing a high traffic website other than getting lucky. So I ask this question to all of you: how would you manage a high traffic site and what tools and techniques should I be looking at? Currently to maintain the sites I work on I concat/minify css/js files, set cache expiry dates, and use development tools to locate b…

  50. Hello there, I have an online store,where the members can subscribe to any of the 3 packages (1, 2 & 3). Below is a sample of the Products DB table. id package product status 1 3 Biro 1 2 1 Paper 1 3 3 Pin 0 4 2 Eraser 1 5 2 Blade 1 6 3 Bag 1 7 2 Pen 0 8 1 Sharpener 1 9 1 Shoe 1 10 2 Chair 1 I displayed the package 3 products first, then package 2 products next then package 1 products last like this; $get_products = mysql_query("SELECT * FROM products WHERE status='1' ORDER BY package DESC"); But what i want to really do is to randomly display all package 3 products first, then randomly display package 2 products and lastly display package 1 products randomly.…

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.