Jump to content
Killersites Forums

scampbell70

Member
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About scampbell70

  • Rank
    New member

Profile Information

  • Gender
    Not Telling
  1. How do I style this table to make it look "prettier" I have tried a little with css and html tags with no luck. // display data in table echo "<table border='1' cellpadding='10'>"; echo "<tr> <th>ID</th> <th>First Name</th><th>Middle Name</th> <th>Last Name</th><th>Client ID</th><th>Diagnosis</th><th>Gender</th><th>Level of Care</th><th>Counselor</th><th>Active</th><th>Aftercare</th></tr>"; // l
  2. The check box doesn't stay checked. Is there a way to fix that?
  3. I got it working without any errors on my xampp setup by changing $Active = (int)$_POST['Active']; to $Active = !empty($_POST['Active']) ? 'yes' : 'no';
  4. I actually tried that example before I posted. I'm sure I'm doing something wrong and probably very simple. I learn best by doing things relevant to something I enjoy but I've only been at this web stuff a few weeks
  5. I have received so much help from this site and the amazing people on it. I am humbled by the amount of knowledge everyone here has. I am hoping that you can help me with something that I am struggling to figure out. I have a check box that successfully writes to my db but I can only get it to work with 1 and 0. I would like checked = yes unchecked to = no but I cant figure it out. Here is the code I am currently using. <strong>Active: *</strong> <input type="checkbox" name="Active" value="1" <?php if($Active == 1) echo 'checked="checked"'; ?>"/><br/> an
  6. Is it possible to have 2 or 3 tables in a database example Table 1 = names Table 2 = address Table 3 = phone numbers and when I fill in my name and number on a form it writes the name to the name table and number to the number table and then I can build a query to pull the phone that goes with the right name? Is it better to spilt it up this way for security or it doesn't really matter? I just feel like I have way to many rows in a single table on my database.
  7. I am using the code from Basic PHP System: View, Edit, Add, Delete records with MySQLi and I am wanting to add some code that will display a total number of results returned from a query. if ($result = $mysqli->query("SELECT * FROM clients where (`clients`.`aftercare` = 'yes')ORDER BY LastName ASC")) My question is how can I display how many records are returned. So for example I run it and it returned 40 names. I would like to add something to the page that says 40 people found. I am sure this is probably very simple, but I am brand new to all of this. Thank you for you help in advance.
  8. I am getting the following error and I am not sure how to fix it. Warning: mysqli_stmt::bind_result(): Number of bind variables doesn't match number of fields in prepared statement in /Applications/XAMPP/xamppfiles/htdocs/test/records.php on line 135 <?php /* Allows the user to both create new records and edit existing records */ // connect to the database include("connect-db.php"); // creates the new/edit record form // since this form is used multiple times in this file, I have made it a function that is easily reusable function renderFor
×
×
  • Create New...