Solved

PHP Quotes

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
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 …

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now