Unirawan
-
Posts
14 -
Joined
-
Last visited
Never
Posts posted by Unirawan
-
-
You can use PHP GD or PHP IMAGEMAJIC to process the image on the fly.
that said, I highly recommend automatically creating thumbs once images are uploaded and directly accessing them thumbs, as it will save server resources, becasue you wont be using all that image processing cpu cycles and ram on each request.
-
-
he wants someone to build it for him.
-
-
-
if this is a permanent redirect, use the following at the top of index.php
<?php Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com/" ); ?>
if its temporary or situational, remove the 301 line
this can also be done with htaccess:
Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.new-url.com/$1 [R=301,L]
and htaccess if this is only a redirect to www.
Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^new-url.com [nc] rewriterule ^(.*)$ http://www.new-url.com/$1 [r=301,nc]
-
http://pokerrpg.com/login.php is the url you need to send the login post data to, not http://pokerrpg.com/
-
change:
$object = $xml->xpath('//item[@name="$option[$i]"]');
to:
$object = $xml->xpath("//item[@name=\"$option[$i]\"]");
or
$object = $xml->xpath('//item[@name="'.$option[$i].'"]');
because php does not parse single-quote strings. PHP only parses double-quoted strings.
-
post your form and processing source code, then we can help you to troubleshoot.
-
agreed - it's redundant.
each $_REQUEST['keyname'] can be accessed directly.
-
it's untested but should work.
<?php $target = '/files/'; $foldername = $_POST['lastname']; $structure = $target.$foldername.'/'; if (!mkdir($structure, 0777, true)) { die('Failed to create folders...'); } if(move_uploaded_file($_FILES['userfile']['tmp_name'], $structure.basename( $_FILES['userfile']['name'])) { echo "<center>The file ". basename( $_FILES['userfile']['name']). " has been uploaded.</center>"; } else { echo "No File was uploaded"; } ?>
-
the $_REQUEST array will contain passed $_POST and $_GET data regardless of the method declaration.
as to protection, use a challenge-response mechanism protection (like captcha/reCaptcha) to prevent automation through your forms. I do not recommend session tickets in hidden form values because they can be bypassed automatically by parsing the html for the hidden values.
I know its a long shot but hey anythings worth asking.
in PHP Coding Help
Posted
Programming is a passion. You need to enjoy what you are doing and enjoy the troubleshooting process, because that's all programming really is - a series of problems you find solutions to in code. You need to look forward to those stumbling blocks that transform into learning milestones. It takes huge amounts of time, drive, ambition, and dedication.
Reference materials are a must, whether they be tutorials (just to get you started and keep you interested), books, and http://php.net/ is a lifesaver.