Jump to content

ADynaMic

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Posts posted by ADynaMic

  1. Hey,

     

    For your first problem with the sql INSERT INTO, I'm afraid I found a missing comma. I hope this thing must have been fixed in your actual php page. But thought I should point this out..

     

    $query = "INSERT INTO UploadedFiles (name, size, type, content, keyword, description)
    
    VALUES ('$fileName', '$fileSize', '$fileType', '$content', '$keyword' '$description')" or die(mysql_error());

     

    There is a MISSING COMMA in between '$keyword' '$description'

     

    Check it out.

    I'll look into the second problem of yours, I'm a beginner, so I'm not sure I can catch it.

    Cheers!

  2. Hi leachus2002,

     

    I got the same problem, it was to use an image exactly as an submit button. Following solved my problem. Give it a try...

    <?php 
        if (isset($_POST['picButton'])){
            /* Hit the goal using the 'value' parameter */                     
        }
    ?>

    It was as usual. Down here the input type is set as 'image' instead of 'submit'. It'll do the trick..

    <input type="image" name="picButton" value="first" src="/images/arrow.jpg"/>

    May have to adjust width height etc. using styles.  8)

     

  3. Dear juniorek9,

     

    I'm really happy.. Even if I had a little programming experience, Its only 3 weeks (to this coming Wednesday) I started reading PHP. You wanna know what helped me?

     

    This is a superb tutorial, Read it, It will polish you up with most of the things you ever want..

    http://devzone.zend.com/article/627

     

    The next is the php online manual, I believe you already use it everyday....

    http://php.net/manual/en/index.php

     

    Keep it up...

    Regards,

    ADynaMic

  4. Hey...

     

    I'm still not a PHP genius. But I tried your problem and came out with an simple answer to do what you wanted. Try it, Let us know if these answers from MMDE and me solved your problem.....  :)

     

    <html>
    <body>
    <h1>Are You a superhero?</h1>
    <?php 
    // This will print the posted array.. You can see what you get
    if(isset($_POST['go'])){
    	print_r($_POST['yesno']);	
    			}
    ?>
    
    <form name="myForm" method="post"> 
    <?php
    $transport = array('r' => 'would You like to fly?',
                     'a' => 'do You like helping people?',
                     'p' => 'do You like to work on your own?',
    			 'h' => 'do wou look good in tight outfit?',
    			 'c' => 'do you have strong personality?',
    			 's' => 'do you drive?',
    			 'f' => 'do you like to travel?');
    foreach ($transport as $key => $transport) {
       //echo  "<input type='radio' name='transport' value='$key'/> $transport <br/>" ;
       //This is the line I changed....
       //Each button group [yes/no] has it's own array key equal to your Transport array key
       // - ADynaMic
       echo "$transport : <input type ='radio' name='yesno[$key]' value = '1'>YES</input>
       			 <input type ='radio' name='yesno[$key]' value = '0'>NO</input></br>";
    }
    
    ?>
    
    <input type="submit" value="go" name="go">
    </form>
    </body>
    </html>
    
    

  5. Dear Fellows...

     

    I got the Same Error "mysql_num_rows() expects parameter 1 to be resource, null given"

     

    The tips given Here was Useful, very much... I think the database record/s we are accessing has an white space at the beginning, then the query does not match them....

     

    Example:

    "SELECT * FROM `data` WHERE `id` LIKE '888%' "

    then this will give the error... but when we edit this as, with whitespace before 888

    "SELECT * FROM `data` WHERE `id` LIKE ' 888%' "

     

    It Worked!

    Check this out.. It may be a solution....

×
×
  • 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.