Recent content by Cully W

  1. C

    PHP code still not working?

    <?php // Connect to server and select databse. mysql_connect("localhost", "user", "password")or die("cannot connect"); mysql_select_db("database")or die("cannot select DB"); //Use SQL to get max value in ID column and use that to name the new file $sql="SELECT max(id) FROM picture"...
  2. C

    PHP MySQL Not a valid resource?

    I've got enough errors I don't even wanna think anymore! Here's what I've got for code: $sql="SELECT max(id) FROM '".$tbl_name."'"; $result=mysql_query($sql); $row = mysql_result($result,'id',0); $row returns as 0, my column in MySQL is ID, and the error is this: Warning: mysql_result()...
  3. C

    MySQL PHP Invalid Resource?

    Here's what I've got. $max = $row; $idnum = $max+2; $name = $_POST['name']; $dat = date(M-N-Y); $comments = $_POST['comments']; $uploader = $_SESSION['name']; $tag1 = $_POST['tag1']; $tag2 = $_POST['tag2']; $tag3 = $_POST['tag3']; $tag4 = $_POST['tag4']; $tag5 = $_POST['tag5']; $sql2="INSERT...
  4. C

    PHP Session Help on $_SESSION variables?

    First off, I've done some testing, and this is the bit of code that's wrong on page 1: session_start(); $_SESSION=array(); $_SESSION['check']=103152; header("location:login2.php"); It should redirect to login2.php (which it does), which has this: <?php if (isset($_SESSION['check'])) { if...
  5. C

    Error with PHP Include()?

    I have this for code on var.php <html><head><title> <?php $gt= 3; echo $gt; ?> </title> </head> and I have this for code on index.php <html> <head><title> <?php include 'var.php'; echo $gt; ?> </title> </head> but whenever I open index.php, it shows <html><head><title>3 It also shows...
  6. C

    What's the best way to edit HTML?

    You can use either Word or Notepad++ Notepad++ is a ppimped up notepad, it can be switched to show a language, ie. if on HTML, it will show you if you made a mistake Word is the Microsoft word that you know and love. It is an HTML Editor, but you'll need to work a little bit to make it work...
  7. C

    How do I get Javascript and HTML to communicate?

    Is there any way for me to take an input box value in HTML, and use it in Javascript?
  8. C

    How do I use PHP to do this?

    I want the people to check the box, and if it is checked, a letter X to appear in the next page. Do I do it like this? <input type="checkbox" name="test" /> next page...<?php echo ?_POST["test"]; ?> Is that right?
  9. C

    How do I make a set of code run every ten minutes in PHP?

    Every ten minutes, I want my information to update. I know the formulas, but not how to make it happen every ten minutes and every midnight. Ideas?
  10. C

    PHP help, display the header, center, and frames with only php?

    I used to help a guy on a website, but I forgot how to do one thing, and I can't find it anywhere. It's a line like <?php get_settings_header ?> and it would display the header. Ideas/help?
  11. C

    Is there anything that I can use to test PHP?

    Like, to test HTML, you'd write it, and save it as an HTM document, and bring it up in a browser. Is there something like that for PHP? I know how to make a PHP file, I know some HTML. I want to test it, as in type in "<?php echo "You wouldn't believe this"; ?> " and see "You Wouldn't Believe...
Back
Top