Solved

PHP Quotes

Posted on 2012-04-01
3
296 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

738 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