473,396 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Adding "'s to a $_POST value

Ant
Hi,

I'm a bit of a newbie to php.

I have some values that I'm getting via the post method which I want to
include in an sql statement - the problem is I need to enclose the value in
"'s but I dont know how.

e.g $id = $_POST["id"];

so, if $id = monkey I want to turn it into "monkey"

Any help much appreciated - I'm sure it's something obvious and I'm just
being thick.

Aug 12 '05 #1
1 1357
Ant
no more replies please, I've worked it out...

thanks though
"Ant" <no****@allthanks.com> wrote in message
news:dd**********@wisteria.csv.warwick.ac.uk...
Hi,

I'm a bit of a newbie to php.

I have some values that I'm getting via the post method which I want to
include in an sql statement - the problem is I need to enclose the value
in
"'s but I dont know how.

e.g $id = $_POST["id"];

so, if $id = monkey I want to turn it into "monkey"

Any help much appreciated - I'm sure it's something obvious and I'm just
being thick.

Aug 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: fartsniff | last post by:
I swear, these loops and for each's are going to kill me (if regex doesn't first ;) anyways, this is what i have: if ($_POST != "") { @$item_name1 = $_POST; @$item_number1 = $_POST; }
5
by: lsarg | last post by:
i've been trying forever to figure out a way to use a regular text link in place of a submit button at the bottom of this. can't get it. i'm just starting to learn php, so i'm stuck. any help at...
1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
3
by: laredotornado | last post by:
Hello, I have a simple login script. I have the pages login.php login_response.php login_success.php login_failure.php What I want to do is have a checkbox on the login.php page where if...
12
by: Matthew Wilson | last post by:
Hi, we are getting a lot of spam through our PHP Feedback form, and have set up a new field 'prove you're human', asking them to do some simple maths. What is the command for the PHP script...
2
by: kilo | last post by:
Hey.. I need someone hwo can help me making my sql table.. I have no php skills. I have payed for a php program that shoud make dictation for people that have some problems reading danish.. with...
9
by: Dhiru1009 | last post by:
Hi guys, I am trying to build a user registration form using PHP and MYSQL but encountring a problem. When I click on submit with empty fields it adds records to database also it doesn't matter...
6
nomad
by: nomad | last post by:
Hello Everyone: I'm having troubles with some coding and Idon't know where it is. I have delevopled a calender where the client can add events to a day. The code worked perfect on my computer but...
4
faugustin
by: faugustin | last post by:
Hi, I have a problem. I have av form with textfields, textareas and a vector type fieldset of checkboxes. Everything but the checkboxes works fine, they result in "array" in the field in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.