As the title says I want to have a text field appear using the if statement.
My simplest attempt....

<?php 
	if($row_Recordset1['NoPages_A'] {
	echo<input type="text" name="firstM" id="firstM" />;}
	
	?>
Member Avatar for diafol

Your close bracket is missing:

if($row_Recordset1['NoPages_A']) {
	echo<input type="text" name="firstM" id="firstM" />;
}

Thanks but I still get...Parse error: syntax error, unexpected '<'

Member Avatar for diafol

Well, you have to enclose html within quotes:

if($row_Recordset1['NoPages_A']) {
	echo '<input type="text" name="firstM" id="firstM" />';
}
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.