Jump to content

[SOLVED] Concatenation


skicrud

Recommended Posts

Both things you tried do not match the examples that were posted. Go back and read the examples. Where quotes are and if they are single-quotes or double-quotes matters in programming because computers only do exactly what your code tells them to do.

Link to comment
Share on other sites

echo "insert into log job_number=$job_number, user=$theid, item_checked=$key, item_comment=$_POST['C_'.$var]"; produces an error

but

echo "insert into log job_number=$job_number, user=$theid, item_checked=$key, item_comment=";

echo $_POST['C_'.$var];

does not.

Link to comment
Share on other sites

Please use


tags around code.

 

You never mentioned it was in a query...

 

Try:

 

echo "insert into log job_number=$job_number, user=$theid, item_checked=$key, item_comment='{$_POST['C_'.$var]}'"; 

Link to comment
Share on other sites

Sorry and thanks

 

You're still new here, don't worry about it.  It just makes the code easier to read by formatting and highlighting code properly.

 

If everything properly works now, please mark as [sOLVED].

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.