what's wrong with my code at line 6, it's give blank page, the output can't display.

$kp = $_POST['kp'];
$kp2 = $_POST['kp2'];
$kp3 = $_POST['kp3'];

require("conn.php");
$sql = "select * from pemohon where kp_baru='$kp' AND kp_baru2='$kp2' AND kp_baru3='$kp3'";

Honestly, I don't know why this code can't display the output coz I know the syntax is correct.

You've tried running this SQL statement within a SQL tool using known values to validate your select statement?

yes, i hv tried

Is there possibly some invalid character in the post values that is breaking the string when expanded at line 6? Are all 3 values present (non-null)?

Check require("conn.php")
It may be having a php error or the file is not getting included properly.
Check path of conn.php

Did you even execute the query?

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.