[24-Dec-2011 04:05:07] PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\inetpub\wwwroot\install\install.php on line 49

here is line's 48 thru 65

48                          $content = "<?php \n".
49			" \n".
50			"/* Database Host Name */ \n".
51			"\$db_host = '" . $post_details['db_host'] . "'; \n".
52			" \n".
53			"/* Database Username */ \n".
54			"\$db_username = '" . $post_details['db_username'] . "';   \n".			
55                           " \n".
56			"/* Database Login Password */ \n".
57			"\$db_password = '" . $post_details['db_password'] . "'; \n".
58			" \n".
59			"/* Database and Session prefixes */ \n".
60			"define('DB_PREFIX', '" . $post_details['table_prefix'] . "'); ## Do not edit ! \n".
61			"define('SESSION_PREFIX', 'probid_'); \n".
62			" \n".
63			"/* Database Name */ \n".
64			"\$db_name = '" . $post_details['db_name'] . "'; \n".
65			"?>";

I am going out of my mind trying to figure this one out

Recommended Answers

All 4 Replies

Please remove this message.

What do you want to achieve with saving a php block in a variable? If you call this variable you already have to be within <?php ?> tags?

I'm unclear on why you are using "." to end your statements instead of ";" but you might want to post lines 1-47, as php errors are often well before the line mentioned in the error message.

Member Avatar for diafol

OK I get it - I think - you want to display php code in a page.

Use &lt; as opposed to < and &gt; instead of >

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.