我使用PHP / MySQL创建目录注册系统,允许用户插入图像/头像。用户可以注册,一切都进入数据库,我的问题是图像上传和检索。
signup.php
<table border="0" cellspacing="0" cellpadding="4">
标志:
<td><div class="sm-textfeild-in">
<div class="textfeild-in">
<input type="file" name="fileToUpload" id="fileToUpload" class="validate[required,ajax[ajaxUserCallPhp]]] textfeild-in-152"/>
</div></div></td>
<td align="left">
</td>
<td>Accepted Formats: <font color="red">jpg, jpeg, png, gif</font></div></td>
</tr>
Save.php
Function.php
function getdirector()
{
global $db;
$sql = "SELECT user_id, profileName, firstname, surname FROM ".PREFIX."users Where admin_approve = '1' and email_verified='1' order by date_register desc limit 3";
$data = $db->select($sql);
$return = '';
$return .= '<table width="340" border="0" cellpadding="2" cellspacing="2">';
foreach($data as $d)
{
$return .= '<tr height="50">
<td width="80" valign="top">
<img src="'.getUserImage($d['user_id'], 75).'" width="76" height="52" class="yash" />
Directory.php
<?php echo getdirectory(); ?>
我可以拉一切,我正在努力获取上传的图像