Jump to content

Steven

Members
  • Content Count

    150
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Steven

  • Rank
    Member
  • Birthday 08/02/1985

Previous Fields

  • Languages
    HTML, HTML5, CSS

Profile Information

  • Location
    The North
  1. Oh, okay. Yeah, that's pretty obvious. Not sure why I thought of that... Thanks!
  2. If I split my form process into different pages, how can I transfer the jobid from viewjob.php to insertComment.php? That is part of why I tried to keep everything on viewjob.php, because the way it knows what job the comment is for, is by grabbing the jobid from the url.
  3. Alright, thanks for explaining that. I'll look into those tools.
  4. I think I've got it: // check if post array contains data if (count($_POST) > 1 ) { // Make the query $q = 'INSERT INTO notes (notebody, noteuser, notejob) VALUES (?,?,?)'; // Prepare the statement $stmt = mysqli_prepare($con, $q); // Assign the values to variables $notebody = $_POST['notebody']; $noteuser = $_SESSION ['userid']; $notejob = $getid; // Bind variables mysqli_stmt_bind_param($stmt, 'sii', $notebody, $noteuser, $notejob); // Execute mysqli_stmt_execute($stmt); if (mysqli_stmt_affected_rows($stmt) == 1) {
  5. I'm trying to use "PRG" to avoid duplicate entries after a page refresh, and am having some trouble. I came across this page: http://geekpad.ca/blog/post/avoiding-re-submission-of-forms But where exactly do I put that code? And what part of my code goes where "/* --- process form here --- */" is?
  6. There's a bug showing up that is causing comment posts to duplicate whenever the page is reloaded. My code seems like it's a mess right now. Especially the error reporting lines beneath "// POST USER NOTES". I'll just paste everything I have: <?php require('includes/config.php');?><!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>Modern Office | Management System</title> <link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/foundation.css"></head><body><?php session_start(); // A
  7. Alright, I added a column "notejob" and made it a foreign key of jobs.jobid. I'm running into a problem, however. It's giving me an error report of "Column 'notejob' cannot be null". Well, in the middle of writing this up, I realized my form's action was "viewjob.php". I had a hunch that my problem was because there was no corresponding jobid=$id appended to the url. I changed the form to this: <form action='viewjob.php?jobid=".$getid."' method='post'> And now it works!
  8. I'm trying to add a simple comments, or notes, system to the job/client manager app I've been working on. I have a viewjob.php page that display a particular job's details based on the jobid in the url. So, http://localhost/job-manager/viewjob.php?jobid=10000 This page displays all the relevant information for the job with id 10,000. And each note that is submitted, needs to be linked with the job it is being submitted to. I have made a new table, "notes". This has the following fields: noteid (primary key), notebody, noteuser, notetime. The ID uniquely id's each individual note, notebody
  9. Steven

    grid and me

    I agree with Davej that, for the most part grids are overkill. But, that being said, I've recently finally gotten around to implementing one. I'm using Zurb's Foundation. It can be pretty overwhelming, but I just started out with a custom download with nothing but the grid itself. It's actually a joy to use, but it isn't for every project.
  10. It might be helpful to take a look at your functions.php page, to see what hooks you're trying to pull to this page.
  11. So on my "viewjob.php" page, you would do something like this: echo '<div class="row">'; echo '<div class="large-3 medium-3 columns">'; echo '<div class="panel jobText--panel">'; echo '<p><strong>Client</strong><br>'; echo '<a href="viewclient.php?clientid='.$id.'">'.$name.'</a></p>'; echo '<p><strong>Job Date</strong><br>'; echo $dates.'</p>'; echo '</div>'; // close panel echo '</div>'; // close large-3 column echo '<div class="large-9 me
  12. So, let's say I want to use strip_tags(). My big question is where do I put it? Would I do something like this? // Check for a description entry if (empty($_POST['description'])) { $errors[] = 'You forgot to enter a description'; } else { $description = strip_tags($_POST['description']); }
  13. After my crash course in PHP/SQL, my brain is a bit fried. I am sure I am missing some security methods in my scripts, and would appreciate the help of some trained eyes. On my "formJobs.php" page, there are three inputs: "Client", "Date", and "Description". The first two inputs are a dropdown list and a datepicker widget, so the user (I'm assuming?) doesn't really have any option or way to submit any invalid data between those first two inputs. They can only select clients already in the "Clients" table, or pick a valid date from a valid calendar pop-out. So I'm not worried about validati
  14. I believe you would use a separate @font-face { } for each font. http://stackoverflow.com/questions/7018535/use-multiple-custom-fonts-using-font-face
  15. It's working now... Must have been a cache issue or something.
×
×
  • Create New...