Forum Statistics

  • Forum Members: 4,502
  • Total Threads: 3,657
  • Total Posts: 1
There are 1 users currently browsing forums.

Partner Sites

Reply
Old 11-04-2008, 09:43 AM   #1 (permalink)
 
Status: On a mission
Join Date: Sep 2008
Posts: 33

Rep Power: 18 susapra is on a distinguished road



Default Using PHP variables in mysql DB fields

Hi everyone,

i want to store php variables in db fields.

IE
$ct = "happy campaign";

// query db result
fieldA = Thanks for getting involved. Your campaign ".$ct. " has been

$body = $fieldA;

echo $body;

result rendered = Thanks for getting involved. Your campaign ".$ct. " has been

The problem i am having is when i collect the field content, even though $ct is defined before the query, $ct is what is stored to the variable and not the previously defined va;ue stored in $ct.

Could anyone help me this?

The result i want to get is

Thanks for getting involved. Your campaign happy campaign has been


Cheers

____________________
KS hard money amber jewelry
susapra is offline Add Infraction for susapra   Reply With Quote


Reply

Bookmarks

Tags
None


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may post new threads
You may post replies
You may post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.5.0 RC2