Hello,
I want to use this snippet to make sure the fields in a form are ok before processing it.
Code: <FORM method="post">
To:
<input type="text" name="name" size="40" value="<?php if($name) { print $name; } else { print "Insert Name"; } ?>">
<input name="action" type="submit" value="Update Form">
</FORM>
It works, but I don't understand why.
The if statement is checking for the variable $name, but I haven't used the code that I would normally use.
What I see in all my tutorials would lead me to use...
$name= $_POST['name];
So, I'm confused as to where the $name variable is being found.
Thanks for your patience
Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a different discussion. Here's the code: shell_exec("nohup curl --create-dirs -o {$write_path}
Create a form of 2 numbers input and find the greatest.
Hi, everybody.I have a homework in my training of php, which ask you to make a form that asks you to input 2 numbers and so tell you which number is greater than the other.I need to know how to make
BI in Upstream Production operations
Appreciate if you can assist in the following areas:
Struct/union and scope problem!
HI all , I have
images aren't rendering
I'm trying to call a JPG file from within PHP (in an effort to hide the actual JPG folder). The image is supposed to be called at domain.com/photo/?id=X&i=Y where X is the gallery ID and Y is
Disable Scrollbar in TableControl
Hello everbody,
question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or should i always put a die() function underneath the header() function?
TemplatePower & AJAX
Hi all,I'm currently implementing some AJAX features in my PHP-framework (which is based on TemplatePower) and I have encountered a problem:I have a block which holds a message-div. This block is
Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there is a way to track uploading with APC and php 5.2 + ?? any suggestions thanks
Question about GD library
I am trying to make an image that shows a random quote from my database.However I want the quote to do 2 things.1. It needs to word wrap so that it stays on the image2. It needs to be the biggest font