aratc
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Developing with WordPress
In reply to: Adding PHP Code@bcworkz, Thank you for the reply. Do you mean uploading the file to the file manager of the cpanel? but after that how to include it in my page?
Forum: Developing with WordPress
In reply to: Adding PHP CodeThank you for your reply, but I’ve already used this plugin and getting the same error, are there restrictions of php functions and can’t be used with wordpress?
Forum: Developing with WordPress
In reply to: Adding PHP CodeI want to add it using elementor pro with plugin, is there another way to upload it?
And here is my code:<!DOCTYPE html> <html> <style type="text/css"> .input1 { background-color: #3498db; color: white; border-color: #3498db; width: 70px; } .input2 { width: 250px; } .input2::placeholder { text-align: right; } .table1, .table2 { border: 1px solid black; } .table1 { background-color: #3498db; } .table2 { background-color: #d9d9d9; text-align: center; } </style> <body> <form method="post"> <input class="input1" type="submit" name="submit" value="تحقق"> <input class="input2" type="text" name="test" placeholder="رقم الشهادة"> </form> </body> </html> <?php $con = new PDO("mysql:host=localhost;dbname=aratcnet_certificates",'root',''); if (isset($_POST["submit"])) { $int = $_POST['test']; $sth = $con->prepare("SELECT * FROM <code>new_table</code> WHERE sit_num = '$int'"); $sth->setFetchMode(PDO:: FETCH_OBJ); $sth -> execute(); if($row = $sth->fetch()) { ?> <br><br><br> <table> <tr> <th class="table1">Certificate No.</th> <th class="table1">Full Name</th> <th class="table1">Course Title</th> <th class="table1">Date Of Issue</th> <th class="table1">Trainer</th> </tr> <tr> <td class="table2"><?php echo $row->sit_num; ?></td> <td class="table2"><?php echo $row->candidate_name; ?></td> <td class="table2"><?php echo $row->course_name; ?></td> <td class="table2"><?php echo $row->date_of_issue; ?></td> <td class="table2"><?php echo $row->trainer; ?></td> </tr> </table> <?php } else { echo "رقم الشهادة غير صحيح، الرجاء التأكد من الرقم وإعادة المحاولة"; } } ?>- This reply was modified 5 years, 3 months ago by bcworkz. Reason: code fixed
Viewing 3 replies - 1 through 3 (of 3 total)