Reputation: 39
It seems like an odd question but here it goes. How do I add two strings together in order for them to appear as one inside the database ?
<input type="hidden" name="user" value ="<?php echo $articless['name'] . " " . $user_data->id; ?>" />
This does not work. My desired outcome is to add them together so they appear as two words added together in a column without spaces for example: articlebox. Is it the . " " . between two variables that needs adjusting ?
Upvotes: 1
Views: 49
Reputation: 7588
Just remove the " ". You combine string using the dot (.) only.
<input type="hidden" name="user" value ="<?php echo $articless['name'].$user_data->id; ?>" />
Upvotes: 1