I have an MySQL table with a field which is filled with a sentence and I'd like to get only the first word of the sentence. After I've the first word I'd like to email out it with a form.
$result = mysql_query("SELECT SUBSTRING_INDEX(`sentence_field`, ' ', 1) AS `firstWord` FROM `table`");
$iresult = $_POST[$result];
Of course it doesn't work. I don't know why. How should I use the $_POST in PHP?