Search engine PHP return error [closed]

On line 33 you have $i++, but you haven’t initialised $i I expect you have a syntax error in your MySQL query. Try this: $query1 = mysql_query($query) or die(mysql_error()); which will display the SQL error which you’ll have to fix. More: Your SQL is susceptible to an injection attack. Make sure you escape your inputs … Read more

Printing pyramid of numbers

Like @Maroun’s answer but simpler int size = 6; for (int i = 1; i <= size; i++) { for (int j = i; j < size; j++) System.out.print(” “); for (int j = 1; j <= i; j++) System.out.print(j + ” “); System.out.println(); } or int size = 6; for (int i = 1; … Read more