llamaultima
-
Posts
3 -
Joined
-
Last visited
Posts posted by llamaultima
-
-
The form will only appear in IE, the page is just blank in Chrome/Firefox, and they're defined in a file called sessions.php
- Sorry for the lack of information, and lack of knowledge on posting here, new user. First time post.
Thanks for the very fast reply.
-
<?PHP
include("include/session.php");
?>
<html>
<head>
<title></title>
<style type="text/css">
.auto-style1 {
text-align: center;
}
.auto-style2 {
border: 2px solid #3366FF;
}
.auto-style3 {
font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}
</style>
</head>
<body style="background-color: #AAC6FF">
<?PHP
if(isset($_SESSION['useredit'])){
unset($_SESSION['useredit']);
echo "<h1><center>User Account Edit Success!</center></h1>";
echo "<p><b><center>$session->username</b>, your account has been successfully updated. "
."<a href=\"javascript:window.close();\">Close Window</a>.</p></center>";
}else{
?>
<?PHP
if($session->logged_in){
?>
<h1 class="auto-style1"><span class="auto-style3">User Account Edit :</span> <? echo $session->username; ?></h1>
<?PHP
if($form->num_errors > 0){
echo "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></td>";
}
?>
<form action="process.php" method="POST">
<div align="center">
<table class="auto-style2" style="width: 300px">
<tr>
<td>Current Password:</td>
<td>
<input name="curpass" style="width: 150px" type="password" value="<? echo $form->value("curpass"); ?>"></td>
<td><? echo $form->error("curpass"); ?></td>
</tr>
<tr>
<td>New Password:</td>
<td>
<input name="newpass" style="width: 150px" type="password" value="<? echo $form->value("newpass"); ?>"></td>
<td><? echo $form->error("newpass"); ?></td>
</tr>
<tr>
<td>Current Email:</td>
<td><input name="email" style="width: 150px" type="text" value="<?
if($form->value("email") == ""){
echo $session->userinfo['email'];
}else{
echo $form->value("email");
}
?>"></td>
<td><? echo $form->error("email"); ?></td>
</tr>
<tr>
<td> </td>
<td>
<form method="post">
<input type="hidden" name="subedit" value="1">
<input name="submit" type="submit" value="submit"></form> </td>
</tr>
</table>
</div>
</form>
<?PHP
}
}
?>
</body>
</html>
PHP - Upload image, store it, add mysql entry + create thumbnail.
in PHP Coding Help
Posted
Hello,
I'm currently using this: http://pastebin.com/h1jMkf7J - it's working great, but I'm noticing that giant images are increasing loading times drastically, so I would like to create a thumbnail of the image as well, somewhere around 400px width and maintaining the aspect ratio. So, it'd be; uploads/theimage.png and uploads/theimage-thumbnail.png
Can anyone help with this please? I've been trying different methods, such as http://www.9lessons.info/2009/03/upload-and-resize-image-with-php.html but I haven't been able to combine the two.
Thanks.