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. Started by MixCreations,

    Hiya one & all. Ive been away from php etc for a while due to looking after an ill family member. I never got time to really delve into what i really love (ie coding) as didnt have the time. Hope to do so from now on. Briefly i typed the following & returned the next following. Can u plz advise why? I am looking to learn. Thankyou <!Doctype html> <html> <head> <title>Form Feedback</title> </head> <body> <?php # Script 2.2 - handle_form.php // Create a shorthand for the form data. $name = $_REQUEST['name']; $email = $_REQUEST['email']; $comments = $_REQUEST['comments']; // Not used: $_…

    • 10 replies
    • 2.2k views
  2. Started by Miracle00,

    Hey guys ( and gals) . I am not really sure how I can use WAMP and PHP designer 7 . I know PHP designer 7 has its own test page but I would like to see the page in the browser. Right now i am using dreamweaver with a testing sever , I would just like to know if there is a way to directly set up WAMP sever with PHP Designer. Thanks in advance

  3. Hi, I have a website www.example.com and I want 1st time visitors to be directed to www.example.com/landing-page. Is there a way I can do this in my htaccess or are there better/alternative ways? Many thanks

    • 8 replies
    • 1.8k views
  4. I have this code inside a form: <?php foreach ($nutrients['core'] as $nutrient) { ?> <label><?php output_nutrient_label($nutrient); ?><input type="number" step="0.1" name="<?php echo $nutrient; ?>" value="<?php output($form_vals[$nutrient], 2); ?>" required></label> <?php } ?> <fieldset> <legend>Others:</legend> <?php foreach ($nutrients['optional'] as $nutrient) { if (isset($user_prefs["show_" . $nutrient])) { ?> <label><?php output_nutrient_label($nutrient); ?><input type="number" step="0.1" name="<?php echo $nutrient; ?>" value="<?php output($form_v…

    • 4 replies
    • 1.7k views
  5. Started by Rainieren,

    Hello, If got a school asignment to make a forum with PHP. I wrote about 50% of the code and i came across a problem, A error message The message stains: Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\forum\content_function.php on line 7 I looked it up on the internet but none of the sites seem to fix my probem. I've been looking for a solution for 2 hours straight now and i'ts driving me crazy. I attached the file to this post for you to see. I hope you guys can help me! Rainier. content_function.php

    • 0 replies
    • 1.6k views
  6. Hello, I am using OO prepared statement. I need to count the number of rows returned and echo out the rows. But the problem is that i can only echo $stmt->num_row only if I include $stmt->store_result(). But if I include $stmt->store_result(), i can't echo out the rows. Below is my script. //THIS WILL ECHO THE num_rows BUT WILL NOT ECHO THE DATA FROM THE DB TABLE $get_user = $conn->prepare("SELECT * FROM realtors_admins WHERE realtor=? ORDER BY unik DESC"); $get_user->bind_param('s', $remail); $get_user->execute(); $get_user->store_result(); $result = $get_user->get_result(); echo $get_user->num_rows."."; while ($row = $result->fetch_as…

    • 0 replies
    • 1.4k views
  7. I have set up some "ajax" with a form. The form takes username/password/email address which inserts into the database from the external "Adduser.php" script. My question: How do I alert the user? I've tried this: $message = "wrong answer"; echo "<script type='text/javascript'>alert('$message');</script>"; But don't think I can alert the user from the external php file. Any ideas?

  8. Hello, I have a login page and I am trying to use the input username & password to confirm member. Below is my code but it is not echoing the name out. $uname = $_POST[username]; $pword = $_POST[password]: $get = $dWay->prepare(SELECT firstname, lastname, city FROM members WHERE username=? AND password=?); $get->bind_param('s, s', $uname, $pword); $get->execute(); $get->bind_result($fname, $lname, $city); $get->fetch(); echo $fname; If I use one parameter like in below code, It will echo out the name. But I must use two (username & password) parameter $get = $dWay->prepare(SELECT firstname, lastname, city FROM members W…

  9. I'm making a kind of browser-based application with PHP and MYSQL. I've got most of the basic bits in place, so it's functional, mostly. There is a lot of work still to be done, though. Refactoring in some places, features to be added, etc. Literally no styling at the moment. Part of the reason I'm making this is as an example of my ability for my portfolio - I'll be putting the code on bitbucket/github when I think it's suitable and will continue to improve it from there. The other reason it's something I want to use for myself. Recently I've found some job descriptions for remote/contract work (junior development) I'd like to apply for - obviously being able to show t…

    • 6 replies
    • 1.6k views
  10. Hello, I am working on an online store. Each product has QUICK VIEW link which popup the product detail in a popup window. But am finding it difficult to make the popup show the detail of the particular product clicked. Below are my codes. $get_items = mysqli_query($my_link, "SELECT * FROM $table ORDER BY id DESC); while($row=mysqli_fetch_array($get_items)){ $id = stripslashes($row[id]); $category = stripslashes($row[category]); $type = stripslashes($row[type]); $product = stripslashes($row[name]); echo "<a href='detail.php?id=$id'>".$product."</a>"; echo $category <a class="preview" href="#product-preview" data-toggle="modal" ></a> } /* …

    • 5 replies
    • 2.4k views
  11. Started by taylor223,

    Can anyone recommend a good web data extraction screen scraping service/software?

    • 5 replies
    • 3.9k views
  12. Does anyone know if there are any free / low cost scripts available for this type of project? Would appretiate links if anyone knows of any.

    • 4 replies
    • 4.6k views
  13. Started by gigman7,

    I'm creating a web site where the top nav bar will wrap if the screen is smaller than needed. How do I prevent that? The site is pimpmykayak.com if needed.

    • 2 replies
    • 1.6k views
  14. Started by declanbooth,

    Hi all. Haven`t seen a topic like mine so hope everything is ok. I have one problem. Recently I was working with my access database and added a lot of info into the document. I `ve got to hand over month report soon I`m working all day and night long. Don`t know why but my PC got BSOD. After that I tried to open my document and see error “Operation failed - too many indexes - reduce the number and try again” What should I do? How can I fix this? Is it because of the size of the document? It`s about 10 gb. My Office 2010 worked just well until it happened. So, any suggestions?

  15. I have a hosted (godaddy) SQL server. They also host my website, which is blank at the moment. All I want on the site is a login page and a search bar to search the database and display the results. Im not quite sure how to set that up. I have PHP my Admin and SQL workbench setup and connected to the server. The database I want to search is uploaded to the server. Any help would be appreciated. Thanks!

  16. Started by rhubarblover,

    I have a table 'preferences' and 'allowed_preferences'. 'preferences' has a column for 'allowed_id' which is a foreign key for 'allowed_preferences'. Hence, a preference must use a valid id from the allowed table to be added. I have a form on a page which submits user preference values to be added/changed/deleted. I want to prevent any invalid values from being sent to the database in the first place, so am using the following code: foreach ($post_vars as $name => $value) { foreach ($allowed_preferences as $pref_name => $values) { if ($name === $pref_name) { $post_vars[$name] = array( 'name' => $name, 'allowed_id' => intval($values['id']), …

    • 2 replies
    • 1.7k views
  17. Started by Dredd2000,

    Hello all, I had to uninstall WAMP the other day, but when I tried to reinstall it I was shown a prompt that stated 'Aestan Tray menu has stopped working'. I've googled this and I've reinstalled the Microsoft C++ studio as advised and made sure the IIS is unchecked on my 'Turn Windows features on or off'. So everything should be OK but it still will not install. I also uninstalled SKYPE as I read that could conflict with WAMP but it still displays the same error message and won't install. I'm running Windows VISTA Home Basic. Can anyone help? Thanks in advance.

  18. Started by -Matthew-,

    Hello all, I have a database called "XYZ" and in there a table called "dates" in here lists all the dates of the year. e.g How ever I need to now add all the dates of the year for 2016, is there a way I could do this using SQL Query? as it would takes me god knows how long to add every date of 2016 manually Thanks in advance, Matt.

  19. Hello all, I'm trying to create three routes for my URLs using CodeIgniter. I've put them into my routes.php stored inside my application/config folder. Here's the code: $route['default_controller'] = "welcome"; $route['404_override'] = ''; $route['home'] = "home/login"; $route['test'] = "test"; The default route and the home routes both work fine but the test route doesn't work. The test doesn't have a parent folder as it's a controller and I thought with the 'welcome' route being a controller and stored inside the same folder as my controller it should mirror that one. Can anyone help? Thanks in advance.

    • 0 replies
    • 1.6k views
  20. Started by Aled Mann,

    I have a lot of 404 errors being generated on my site which looks like they're coming from HEAD requests of images. They all look like this: "HEAD/wp-content/uploads/2015/11/joeblogg@2x.jpg" Doing a quick Google search this sounds like possibly a setting for Mac Retina displays so I guess if the request comes from a device that supports retina display it will attempt a HEAD request for a higher resolution copy of all the images? Has anyone encountered this before and know how to resolve it? I've updated retina.js to the latest version so hopefully this will help. Thank you.

    • 1 reply
    • 1.6k views
  21. I wrote a nice function to get all the images inside a directory and display them - spent over an hour on this, it even performs checks to make sure it is definitely an image file and nothing malicious. I was so pleased! However, I have just suddenly realised that not entering the image information manually means they have no alt text. Is it at all possible to kind of attach alt text to an image file that you can then get the information for? Probably no...?

    • 6 replies
    • 1.9k views
  22. I am trying to change an existing form to allow emails to forward to selected recipients from a dropdown. I've got the form sorted but am in the dark as to making it work in my php form script. //SMTP SETTINGS require 'PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'smtp.webhost.co.nz'; // Specify main and backup server $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'xxx'; // SMTP username $mail->Password = 'xxx'; // SMTP password $mail->SMTPSecure = 'ssl'; …

    • 0 replies
    • 2.6k views
  23. Hi all, I'm trying to figure out how to connect to a REST API i have been provided and integrate to a magento web store. I have never worked with REST before and my knowledge of API's stops at basic paypal level with the form post method. Needless to say i dont know where to begin or what i should even be reading up on. The API i have been provided is http://docs.rxverification.apiary.io and my basic understanding is i need to collect customer info and pass it on to the API where results will then be displayed for the customer to select. Where would i start with this and is there any resources i can read over? Thanks

  24. Started by Brock,

    I have this script which copies files from an existing folder (client) to a new folder (1). $root = __DIR__; mkdir("$root/1",0755,true); $source = "$root/client"; $dest= "$root/1"; foreach ( $iterator = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator($source,\RecursiveDirectoryIterator::SKIP_DOTS),\RecursiveIteratorIterator::SELF_FIRST) as $item) { if ($item->isDir()) { mkdir($dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName()); } else { copy($item, $dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName()); } } I am then deleting that new folder with this: //chmo…

  25. Started by rhubarblover,

    I'm new to databases and am making an application type-thing for myself and my husband to use, as practice, and hopefully proof of my skills at some point. I'm having a hard time getting my head around how to structure the database. This is a food tracking application. So far I have a table for user profiles, foods and recipes. Each user profile has username, password, and preferences such as calorie allotment etc. I need a way of storing information for each day. So database foods used, any calories added in separately, and daily totals. Not sure how this would usually be done. Would you have a table for each day, prefixed with the user id/name and date, …

    • 3 replies
    • 1.9k views
  26. Started by Revs,

    Hi, does anyone know where I can find a list of all Mac models so that I can use them in a drop-down list on my site? A bit like on MacTracker or on EveryMac.com, or also on Crucial.com. I could of course type down these lists myself, but I thought there may be a faster solution. I know that you can buy databases like these for car models for example. At least I've seen them. They're used on sites that sell cars or also car parts for example. Thanks.

    • 0 replies
    • 1.6k views
  27. I have used a "borrowed" simple PHP script to create a nice Contact Me page on my website at www.ve3oat.ca. Each time a visitor sends me a message, I get two errors in my error-log : PHP Notice: Use of undefined constant INPUT - assumed 'INPUT' in /home/veoatca/public_html/acknowledge.php on line 11 and PHP Notice: Use of undefined constant POST - assumed 'POST' in /home/veoatca/public_html/acknowledge.php on line 11 My line 11 contains : $email = filter_input(INPUT-POST, 'email', FILTER_VALIDATE_EMAIL); I am not a PHP programmer and wonder if anyone recognizes these errors and can point me to a solution. I assume I need to declare INPUT and POST som…

    • 5 replies
    • 2.2k views
  28. I'm trying to load all my follow buttons under a global php variable $follow. It was working until lines 13 - 20 was entered. It seems php has a problem integrating a script into it's vibe (not sure if it's a statement here?). I put the twitter script outside and in the html file below the $follow php variable and it works, but this does not work with facebook. I noticed I was getting errors around line 20 \'script\', \'facebook-jssdk\'));</script>'; and this was from the single quotaion marks; which I solved by using the escape character \ prior each occurence. <?php $follow = '<div class="g-fol"> <div class="g-follow" data-annotation="…

  29. Hi! I have some problem probably with one of my apache conf. files, but I'm not quite sure. I work as part of a team. We have a test server set up and a repo. I pull the files, start the work on my localhost. The site I am working on has several server aliases, like admin.puba.lh, m.puba.lh, and static.puba.lh. Of course the site is puba.lh. Admin is for the admin panel, m is for the mobile version, and static, is where the fonts are coming from, as far as I can see it. I do only the sitebuild part, not the php. My problem is, that FontAwesome is not showing on my localhost.I have checked the urls where the site is trying to pull the font files, when enter the url in …

  30. Hello all, I've googled everywhere to find out how to convert a DateTime($var_name) into a string, (I need to use the string inside a natsort() function, but whenever I put the date variable inside the function it throws an exception stating cannot convert date to string). I've google everywhere and all I find is the complete opposite. All the pages are how to convert a string to a Date format and not the opposite. Does anyone know how to convert a DateTime object to a string? Thanks in advance.

    • 0 replies
    • 1.6k views
  31. Started by edwardcarr,

    Hello, I work with the mysql database for a couple of months now could not open it, because there was an error: “Incorrect key file for table: '...'. Try to repair it” Who can tell how open the database? Thanks to all.

  32. Hello all, I'm extracting data from three tables and displaying them by date in desc order, however, the sort isn't working how I want it. It's sorting the date correctly but it's sorting the days rather than the whole day/month/year. For example The dates are: 25-01-2016 20:52:42 22-01-2016 14:54:25 21-08-2015 14:33:45 21-08-2015 14:16:12 16-01-2016 22:59:03 13-10-2015 12:59:16 12-01-2016 14:58:04 …

  33. Started by Gary Newport,

    I may be developing a new site shortly, given that the replacement for the old site is not looking like it will be delivered. I intend on starting from scratch and so am already thinking of the coding strategies I should be putting in place. When I originally built the site I used a single index.php file, which connected to the database and held the SESSION START. Through a series of $_GET statements and a SWITCH, the index.php would load other pages as required. This meant that the structure of the site was hidden from visitors. I also used procedural PHP and not Object Orientated; avoiding the need at the time to get my head around the syntax. I am still not…

  34. So here is the current open source project i'm working on which is a Database class. There are 3 classes the project includes 1 that gets extended by all other classes, one for interacting with databases using the Mysqli extension and one for interacting with databases using PDO. The PDO class is the one i've tested the most so far so the below examples will be using that class. The link to the PDO class on github is below. https://github.com/webdeveloper73/SQLLit/blob/master/pdo/sql_lit_pdo.php Selecting data from table <?php //Core must get loaded require_once("core/sql_lit_core.php"); //Lets use PDO require_once("pdo/sql_lit_pdo.php"); //Init PDO library a…

  35. Started by rhubarblover,

    My .htaccess file is making: mywebsite/images/ into mywebsite/images/.php Can anyone help? Here's my .htaccess file - I don't really know what I'm doing with it: (That's just an example website name...)

  36. I found this in my error log: [10-Jan-2015 11:07:57 UTC] PHP Parse error: syntax error, unexpected '"You have received a new messa' (T_CONSTANT_ENCAPSED_STRING) in blablabla.php on line 59 (No, the file isn't really called blablabla.php) Line 59 has different code entirely, and what's more, I don't use the phrase 'you have received a new message' at any point, I use 'you have been sent a message'. What is going on? I've checked the file several times, used the find function, that line doesn't exist. There are other files by the same name but they're in different directories which don't have this in their error logs. Very confused right now... Edit - Well, t…

  37. One of my site will disable and shows a message that pdo_mysql extension is disabled. Here is the link of a site http://www.narellanhomeimprovement.com.au/. I check my php.ini and enable these extensions there as well.But still after sometime the site shows this message and than it automatically works fine. I don't know how to figure it out.I check form phpinfo file that extension is enabled.So what you guys thinks what's the actual issue?

    • 2 replies
    • 1.7k views
  38. Started by James Bond,

    Hey guys , I am facing a issue at one of my client's site. " The client was just reviewing some of the pages on the site and found some odd items that have homepage, then home26317? Screen shots are attached When looking at the individual home page, it has a list of email addresses appears." So actually there are almost 12 or more than 12 home pages appears on the site which I am not getting that how they comes and created.Every page contains the emails of customers? Any Idea what's the issue is? How these pages are created?

    • 3 replies
    • 1.8k views
  39. Started by Lighthouse Web Design,

    Hi, I'm having some issues with 500 errors and 502 errors. I have contacted our server company and they are saying the they could see some mysql queries that were causing high resource usage on the server. Some of these were - I have used *** where it names the database name or company/website url: 523 ***_ localhost ***_w 6 Query SELECT `core_url_rewrite`.* FROM `core_url_rewrite` WHERE (request_path IN ('***/***/*** 519 ***_ localhost ***_h 8 Query SELECT ID, post_name, post_parent, post_type FROM wp_posts WHERE post_name IN ('accommodation','***') AND post_type IN ('pa 516 admin_per localhost admin_perf 15 Query SELECT option_name, option_value FROM wp_option…

  40. Hi guys, I'm making a simple contact form and am having an issue with getting it to display "from" correctly in the recipients mailbox It collects the info from the contact.html form, and then passes it to the contact.php form for processing and I can display it in the email body itself, but how do I get it to read the variable $email when using the code below: <?php $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $email = $_POST['email']; $message = $_POST['message']; $to = "andye30_321bhp@hotmail.com"; $subject = $_POST['subject']; $headers = 'From: anybody@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X…

    • 3 replies
    • 1.7k views
  41. I learn sql using https://www.youtube.com/watch?v=7Vtl2WggqOg I have the doubt in this.Changing tables from one database to another database.help me

    • 0 replies
    • 1.7k views
  42. Hi everyone, I'm quite new to PHP, and I've recently reconfigured my website to use global PHP headers and footers. This involved changing all my pages from the .html extension to .php. I have included code in the .htaccess to remove the .php from the URL of my pages, but for some reason this now results in my PHP email form not working. Instead of processing a message sent through the form, the result returns the $feedback_page when the submit button is pressed. Here is my .htaccess code: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / ## don't touch /forum URIs RewriteRule ^forums/ - [L,NC] ## hide .php extension …

  43. I'm just doing this as part of a course to learn PHP, so it probably doesn't really matter anyway, but I'd like to have good habits from the start. I'm learning to create a CMS and I'm creating a page to edit user details. I have two password fields so the user has to re-type it, and they will be compared to see if they match. I'm stuck on what to do with them. Should I compare the fields first, and if they match go on to password validation for one of them? Or should I pick a field (which though? Does it even matter?) and validate the password, then if there aren't any errors see if they match? At what point do I check that both fields are filled in? :/

  44. Hello, I am working on my personal website at the moment, and I have done everything, except when a message comes through from a user via the contact form, and email is successfully sent to me, but the content contained within said email is blank. My code is below: PHP (sendmail.php) <?php header('Content-type: application/json'); $status = array( 'type'=>'success', 'message'=>'Your email has been succesfully sent.' ); $name = @trim(stripslashes($_POST['name'])); $email = @trim(stripslashes($_POST['email'])); $subject = @trim(stripslashes($_POST['subject'])); $message = @trim(stripslashes($_POST['message'])); $email_…

  45. Hello WebDesignerForum, I've got a huge XML file. Currently it's about 56 GB and increasing size about 250 MB / week. I don't need all the elements in the XML file, and not all the elements contains the same information. How can I stream this file and check if a specific child exist and then insert it to my database, and if not then go for next element? I've tried searching for PHP scripts, VB.net and C# code, so i accept any help in these languages Thanks

  46. Hello Webdesignerforum.. I'm currently working on extracting specific parts from a different website. My plan is to get the html source code and extract the part with preg_match I need. This is what i currently have. $str = htmlspecialchars(file_get_contents('http://www.example.com/')); $start = '<title>'; $end = '</title>'; preg_match('/'.$start.'(.*?)'.$end.'/', $str, $match); echo $match[1]; My search strings $start and $end are both part of the source code and can consist of all the normal symbols you might find in a html code like ' " , < > / : ; so i guess i have to avoid these symbols as much as possible. If i search like this: $s…

  47. Started by jimmyburgess,

    Before upgrading to EXCEL 2010, I am able to open dbf files created in Visual FoxPro 7 or 9 in Excel 2003. I am not sure why after installing EXCEL 2010 I am no longer able to open the file. I get the error message when I tried opening the dbf file in Excel 2010 "the file you are trying to open is in a different format than specified by the file extension" I have tried opening the dbf file via the File Open method but it still cannot work. If I copy the file to a lower dbf format (type fox2x) then I am able to open the file in Excel 2010 Does Excel 2010 support dbf files created by Visual FoxPro 7 or 9?

  48. Hello WebDesignerForum I'm have a problem with updating data in my database. Lets say I have a database like this: Database Name: 'Companies' Columns: 'Company' | 'Address' | 'ZipCode' | 'City' | 'Lng' | 'Lat' | 'Rating' | 'Price1' | 'Price2' I get the data for my database from 2 sources. The columns company, address, zipcode, city, lng, lat and rating I extract from a table on a different website, where i grab the html code and run a macro which removes all the unwanted code. I'm left with a textfile where each row is a different company and each column is separated by a semicolon. I then save this as a .csv file and import this to a new table in my databas…

  49. I am currently testing out a laptop with Linux and as such have offered to develop a website I started on a Windows system on this new system. I therefore copied the files across without altering a single line of code; the site worked on the Windows system running XAMPP. I have installed XAMPP, have set up the HTDOCS with the correct permissions and copied the site across. When I run the code I get the following error messages: Warning: include_once(/opt/lampp/htdocs/jwnewport/functions/functions.php): failed to open stream: Permission denied in /opt/lampp/htdocs/jwnewport/index.php on line 11 Warning: include_once(): Failed opening '/opt/lampp/htdocs/jwnewpo…

  50. Hey guys, I am doing some reading on --save and --save-dev because I want to gain more understanding about the topic but I feel like all the explanations are missing more examples to differentiate the two meanings. For example: Testing modules to use --save-dev and production module to be --save. I felt like this would be a good topic to discuss with people about to gain a better understanding about it? I have read these stack overflow questions and this blog but I still cant get my head 100% around it. http://stackoverflow.com/questions/19223051/grunt-js-what-does-save-dev-mean-in-npm-install-grunt-save-dev http://stackoverflow.com/questions/195787…

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.