Solved

PHP Quotes

Posted on 2012-04-01
3
300 Views
Last Modified: 2012-04-01
This is very frustrating for me, but I have the following query and it will not add the date field since there are not quotes around it.  Regardless of how I structure the quotes, the dang page will not load properly due to encapsulated quotes.


$sql_fields = "'.$date.'", "'.$directions.'", "'.$video.'", "'.$videolink.'", "'.$totalquestions.'", "'.$totalinputs.'", "'.$dateadded.'", "'.$addedby.'";
0
Comment
Question by:t3chguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 37793932
That maybe the data but that's not the whole query.  Since your start and end quotes are double quotes, you don't need to use the '.' syntax to include variables.  This is what I would do with that data:

$sql_fields = "'$date', '$directions', '$video', '$videolink', '$totalquestions', '$totalinputs', '$dateadded', '$addedby'";
0
 
LVL 1

Author Closing Comment

by:t3chguy
ID: 37793936
Awesome, thanks!
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37794016
You're welcome!
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question