๐ Source: index.php
<!DOCTYPE html>
<html lang="ro">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Formular Date Personale</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;400;500;600;700;800&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', system-ui, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 2rem 1rem;
}
.container {
max-width: 600px;
margin: 0 auto;
}
.card {
background: white;
border-radius: 2rem;
padding: 2rem;
box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.25);
}
h1 {
font-size: 1.8rem;
font-weight: 700;
margin-bottom: 0.5rem;
background: linear-gradient(135deg, #667eea, #764ba2);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
.subhead {
color: #64748b;
margin-bottom: 1.5rem;
font-size: 0.9rem;
}
.input-group {
margin-bottom: 1.2rem;
}
label {
display: block;
font-weight: 600;
margin-bottom: 0.5rem;
color: #1e293b;
}
input[type="text"],
input[type="email"] {
width: 100%;
padding: 0.85rem 1rem;
border: 2px solid #e2e8f0;
border-radius: 1rem;
font-size: 1rem;
transition: all 0.2s;
}
input:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}
input[type="file"] {
width: 100%;
padding: 0.7rem;
border: 2px dashed #e2e8f0;
border-radius: 1rem;
cursor: pointer;
background: #f8fafc;
}
.preview {
margin-top: 1rem;
display: none;
}
.preview img {
max-width: 150px;
border-radius: 1rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
button {
width: 100%;
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
border: none;
padding: 0.85rem;
font-size: 1rem;
font-weight: 600;
border-radius: 1rem;
cursor: pointer;
transition: transform 0.2s;
}
button:hover {
transform: translateY(-2px);
}
.error {
background: #fee2e2;
color: #b91c1c;
padding: 0.75rem;
border-radius: 1rem;
margin-top: 1rem;
}
footer {
text-align: center;
margin-top: 1.5rem;
color: rgba(255, 255, 255, 0.7);
font-size: 0.75rem;
}
</style>
</head>
<body>
<div class="container">
<div class="card">
<h1>๐ Formular Date Personale</h1>
<p class="subhead">Completeazฤ cรขmpurile de mai jos</p>
<form action="view.php" method="POST" enctype="multipart/form-data">
<div class="input-group">
<label>๐ค Nume</label>
<input type="text" name="nume" placeholder="Ex: Popescu" required>
</div>
<div class="input-group">
<label>๐ Prenume</label>
<input type="text" name="prenume" placeholder="Ex: Ion" required>
</div>
<div class="input-group">
<label>๐ง Email</label>
<input type="email" name="email" placeholder="exemplu@email.com" required>
</div>
<div class="input-group">
<label>๐ผ๏ธ Imagine (PNG, JPG)</label>
<input type="file" name="imagine" accept="image/*" onchange="previewImage(this)" required>
<div class="preview" id="preview">
<img id="preview-img" src="#" alt="Previzualizare">
</div>
</div>
<button type="submit">โจ Trimite datele</button>
</form>
</div>
<footer>Datele tale sunt procesate รฎn siguranศฤ</footer>
</div>
<script>
function previewImage(input) {
const preview = document.getElementById('preview');
const img = document.getElementById('preview-img');
if (input.files && input.files[0]) {
const reader = new FileReader();
reader.onload = function(e) {
preview.style.display = 'block';
img.src = e.target.result;
}
reader.readAsDataURL(input.files[0]);
}
}
</script>
</body>
</html>
โ Back