No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I am doing a database search using php. Everything works rights except when I just press the enter button (not searching anything) or a match is not found. In those two situations, I want a message displaying no items were found. Currently, when I search for nothing by pressing submit, … |
|
I'm trying to use php to validate my form. I would like to validate a product_name box for being not empty, a price box for being numeric and having a decimal, and a quantity box for being an integer. Right now I'm getting an error: Parse error: syntax error, unexpected … |
|
I'm having a problem creating a dropdown list and populating it with information from a database. When I display the page below I get this PHP code displayed in place of the drop down menu: " \n"; while ($row = mysqli_fetch_array($result)) { $str .= '' . $row['systemName'] . ' ' … |
|
I'm trying to create a class that provides object serialization and deserialization methods for use by another class. These two methods (I think) are in the class already (see code below). I'm not sure how I would go about making those 2 methods their own class and then returning the … |
|
I'm having a problem figuring out what goes in the SecurityAlarm class. It is an abstract base class with 3 methods: alarmFailure() (cannot be overridden by any subclass), and alarmSensor(), alarm() (both are abstract. EntryAlarm is a class that inherits from SecurityAlarm. If the simulation of an alarm exceeds the … |
|
I can't figure out what the problem is with my code. What I want it to do is add a new sandwich to the database when all fields are filed out and an image is uploaded. If product name field is not entered, the sandwich selected in the dropdown box … |
|
I'm getting this error and I can't figure out why: "Parse error: syntax error, unexpected $end in C:\Program Files\IndigoPerl\apache\htdocs\process_menu2.php on line 160" thanks :) [code]<?php echo '<html> <head> <title>Uploading...</title> </head> <body> <h3>Uploading file...</h3>'; // Set up the database connection. require_once ('mysqli_connect.php'); //if name selected from drop down box if (isset($_POST['product_name'])) … |
|
I'm having a problem changing an abstract class to an interface. I changed the abstract class (Bounceable) to an interface but I'm not sure what I need to do with the concrete classes (Tennisball, Basketball) that implement the interface. The change to an interface is also affecting the output test … |
|
I want the program to update or add to a database. If an item is selected from the dropdown menu (filled with the product names already in the DB), they I need to update the fields with the information typed by the user or update the picture that is uploaded. … |
|
I need to add a new sandwich name, description, origin, price and picture to a database. These are to be added to multiple tables. Ignore the drop down menu, it doesn't have anything to do with the query. The problem I'm having is getting the new product_id which is auto … |
|
i'm having a few problem with my phone book program: 1. If the any of the buttons have empty fields, I need to display an error message. How would I do that? Some sort of try/catch statement or if/else statement? 2. I'm a bit clueless as how I would go … |