Jump to content

ianhaney50

Members
  • Posts

    261
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ianhaney50

  1. Hi Thank you for the quick reply, appreciate it Oh right, what we want is to auto generate repair numbers rather than ourselves having to put each one in ourselves and to avoid duplication as well as we might forget what the last repair number was
  2. Hi I have created a form that stores data in a MySQL database and all works perfect but was wondering if there is a way to pre fill the ID number from the MySQL database so for example the last ID number is 8 so when I go the form next time to add new data, the ID number would already be pre filled for me and would be 9 Is that possible to do? I tried doing a Google search but could not find anything related to what I need Thank you in advance Ian
  3. Hi hyster Thank you so much for the reply, appreciate it I put the coding in and got the following error within the table that displays the results from the database Notice: Undefined index: id in /home/sites/it-doneright.co.uk/public_html/admin/view-customers.php on line 79 " onClick="return confirm('."'Are you sure you want to delete this record?');".'">Delete
  4. Hi I am in the middle of making a edit customers details php page and came across a id issue, it is adding odd numbers to the id instead of the correct id it should be below is my coding for the view customers php page <?php $con= mysqli_connect("localhost", "username", "password", "username"); if(!$con) { die('not connected'); } $con= mysqli_query($con, "SELECT plans_name, machine1, machine2, machine3, machine4, machine5, customer_name, customer_email, customer_phone, DATE_FORMAT(date_purchased_plan, '%d/%m/%Y') AS date_purchased_plan from plans"); ?> <div> <td>Customers</td> <table> <th>Support Plan</th> <th>Machine 1</th> <th>Machine 2</th> <th>Machine 3</th> <th>Machine 4</th> <th>Machine 5</th> <th>Customer Name</th> <th>Customer Email</th> <th>Customer Phone</th> <th>Plan Purchase Date</th> <th colspan="2">Actions</th> </tr> <?php while($row= mysqli_fetch_array($con)) { ?> <tr> <td><?php echo $row['plans_name']; ?></td> <td><?php echo $row['machine1']; ?></td> <td><?php echo $row['machine2']; ?></td> <td><?php echo $row['machine3'] ;?></td> <td><?php echo $row['machine4'] ;?></td> <td><?php echo $row['machine5'] ;?></td> <td><?php echo $row['customer_name'] ;?></td> <td><?php echo $row['customer_email'] ;?></td> <td><?php echo $row['customer_phone'] ;?></td> <td><?php echo $row['date_purchased_plan'];?></td> <td><a href="edit-customer.php?id=' . $row['id'] . '">Edit</a></td> <td><a href="delete.php?id=' . $row['id'] . '" onClick="return confirm('."'Are you sure you want to delete this record?');".'">Delete</a></td> </tr> <?php } ?> </table> </div> In the url when I click on edit, the url looks like the following http://www.it-doneright.co.uk/admin/edit-customer.php?id=%27%20.%20$row[%27id%27]%20.%20%27 see the issue with the %27%20 etc. is there something I need to add in the view-customers.php file? Thank you in advance Ian
  5. Hi iarp Thank you, appreciate it, will take a look
  6. Hi I need to create a PayPal donate button on a website which is the easy part but need to display the amount donated so far on the website and seeing how I would do it, would it be done by using API or is there another way to do it as looked all over Google and can't see a way to do it? Thank you in advance Ian
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.