Why won't this post?

Discussion in 'PHP' started by harlequeen, May 6, 2006.

  1. #1
    I have been setting up a small database and had the entry form working, putting in data to two files. 1 - article 2 - topic.

    After making some amendments to the various files I was working on I cannot now post some of the data.

    The topic id number won't go to the field. I had this problem initially and fixed it, but now I can't fix again. I am going around in circles with this.

    Below is the code from my form page.

    <input type="hidden" name="article_id"  value="" size="8" maxlength=8><br>
    <input type="text" name="article_title"  size="60" maxlength="60"><br>
    Article Date - (yyyy mm dd)<br>
    <input type="number" name="article_date" size="12" maxlength=12><br>
    Select Article Topic<br>
    <select name="article_topic_id" size="1">
      <option value="1">Barbados</option>
      <option value="2">Domincan Republic</option>
      <option value="3">Kenya</option>
      <option value="4">Goa</option>
      <option value="5">Spain</option>
    </select><p>
    
    Article Text<br>
    <textarea name="article_text" cols="45" rows="12"></textarea><br>
    Article image<br>
    <input name="article_iamgelink" type="text" size="60" maxlength="60"><br>
    
    If article is current enter "C" 
    <input type="text" name="status" size="1" maxlength="1"><br>
    HTML:
    and this is the code from my 'receiving page'

    $article_id=$_GET['article_id'];
    $article_top_id=$_GET['article_top_id'];
    $article_title=$_GET['article_title'];
    $article_text=$_GET['article_text'];
    $article_date=$_GET['article_date'];
    $article_imagelink=$_GET['article_imagelink'];
    $status=$_GET['status'];
    $topic_id=$_GET['article_topic_id'];
    $topic_title=$_GET['article_title'];
    $topic_desc=$_GET['article_text'];
    
    
    
    
    $articlequery=("INSERT INTO article VALUES('$article_id','$article_top_id','$article_title','$article_text','$article_date','$article_imagelink','status')");
    
    
    $topicquery =("INSERT INTO topic VALUES('$article_topic_id','$article_title','$article_text')");
    
    PHP:
    The article_top_id will not post to either table.
    Can anyone please help me with this as I just can't see what's wrong.
    Thanks in advance

    Harlequeen
     
    harlequeen, May 6, 2006 IP
  2. Big 'G'

    Big 'G' Member

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    48
    #2
    Your form is not showing any field to pass the
    #
    $article_top_id=$_GET['article_top_id'];
     
    Big 'G', May 6, 2006 IP