Jump to content

problems with a form, can upload a picture but loose username and password


hasjem

Recommended Posts

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

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"<?

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 = '';}

Archived

This topic is now archived and is closed to further replies.

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