hasjem Posted May 5, 2010 Share Posted May 5, 2010 I have the following form to upload a picture, that works <form name="newad" method="post" enctype="multipart/form-data" action=""> <table> <tr> <td> <input type="file" name="image"> </td> </tr> <tr> <td> <input type='hidden' name='naam' value"<?echo$naam;?>"> <input type='hidden' name='wachtwoord' value"<?echo$wachtwoord;?>"> </td> </tr> <tr> <td><center> <input name="Submit" type="submit" value="Upload afbeelding"></center> </td> </tr> </table> </form> but in this way the hidden information (username and password) are not send. how can I do that? probably comes because of enctype="multipart/form-data" but i need that to send the picture. how do i send a picture AND the userinformation? thanks lex moen Quote Link to comment Share on other sites More sharing options...
callesson Posted May 5, 2010 Share Posted May 5, 2010 I tryed to use the <?echo$something?> and nothing happend, then i typed <?php echo$something?> and it responded. I dont know it will help, but try add "php" ;<?php; EDIT Also i see that your missing equal sign = value="<?php Not Value"<? Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted May 5, 2010 Share Posted May 5, 2010 You should always put php code between <?php ... ?> Some servers still support short tags but you would need a space after the opening ? and before the closing one eg <? echo... ?> There is also nothing in the code that you have posted that assignes the $namm and $watchwoord variables. try adding this above your table code if you don't have it anywhere else: <?php if(isset($_POST['namm']){ $namm = $_POST['namm'];} else{$namm = '';} if(isset($_POST['watchwoord']){ $watchwoord = $_POST['watchwoord'];} else{ $watchwoord = '';} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.