Jump to content
Forum Roportal
Sign in to follow this  
Awfully

i need help with php

Rate this topic

Recommended Posts

am si eu nevoie de putin ajutor cu php..

eu vreau sa pun un form pe site'ul meu cu care sa alegi fisierul care vrei sa-l uploadezi iar apoi click pe butonul UPLOAD FILE... si cam atat...

 

p.s. sunt paralel cu php'ul :)

am si server ftp sau cum ii zice, unde sa se duca fisierele...

va rog sa ma ajutati :ermm:

 

daca nu ma insel, asta e codu pt. upload?

 

<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>

Share this post


Link to post
Share on other sites

ala e codul html. codul php ar trebui sa fie in upload_file.php (da' nush cum ar trebui sa arate :cat: si io is incepatoare)

 

pana una alta, am si eu o problema in php (mica pentru altii, mare pt mine :D ) :

 

Am structura urmatoare :

<?php 
<table border="1"> <tr><th>Titlu</th><th>Autor</th><th>An aparitie</th></tr>
if($id==3) { $query=mysql_query("SELECT * FROM carti");
		while ($row=mysql_fetch_array($query)) { print "<tr><td>".$row['Titlu']."</td><td>".$row['Autor']."</td><td>".$row['An_aparitie']."</td></tr></table>"; }
		}
</table>			
?>

 

si nu ma prind de ce pt randul 2 imi afiseaza eroarea

 

"Parse error: syntax error, unexpected '<', expecting T_STRING in C:\xampp\htdocs\test1\index.php"

 

Anybody? thx!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×