
void
Members-
Posts
76 -
Joined
-
Last visited
Everything posted by void
-
How do I turn firstname and last name to full name? *Source Attached*
void replied to joshuaceo's topic in PHP Coding Help
Well, it's because you overwrite your $sql variable afterwards. Use different variables. Function mysql_query() executes the query, not defining of a variable itself. -
How do I turn firstname and last name to full name? *Source Attached*
void replied to joshuaceo's topic in PHP Coding Help
Are we talking about a basic string concatenation here? $sql = "INSERT INTO users_shiping (name) VALUES ('{$_POST[fname]} {$_POST[lname]}')"; -
what code?..
-
guys? ???
-
index.php?side=billeder&id=kira
-
anyone? :/
-
Well nothing special really. <?php set_time_limit(0); $out = shell_exec("./program.out"); echo nl2br($out); }
-
Good day I have a php file which executes shell script with shell_exec() command, that runs for about 15 minutes. The problem is, browser keeps "loading" the php file, but after like a minute or two, it stops and says "Done.", even though the shell script continues is job. Everything would be great, except i need php script to do some work after the shell script is done. set_time_limit is set to zero. any thoughts? Thanks.
-
wouldn't mysql_query("CREATE TABLE IF NOT EXISTS `your table` ( ...."); do the trick?
-
some basic thinking ... while ($rowi = db_fetch_array($resulti)) { $names .= $rowi['name'] .", "; } echo substr($names,0,-2);
-
[SOLVED] adding an image in the middle of some text on an HTML form
void replied to DataRater's topic in PHP Coding Help
Well, you could use mod rewrite functionality. This requires .htaccess file in your site directory, with the following content (and your custom paths, if the files are not located in root directory): RewriteEngine On RewriteBase / RewriteRule ^(.+)\.jpg$ /image_output.php?file=$1.jpg [L] This should redirect any requests for a jpg image to your image_output.php file. eg. www.site.com/picture01.jpg will be internally redirected to www.site.com/image_output.php?file=picture01.jpg -
[SOLVED] adding an image in the middle of some text on an HTML form
void replied to DataRater's topic in PHP Coding Help
You have to create image_output.php file with the following content: <?php $image = imagecreatefromjpeg("path/to/image.jpg"); header('Content-type: image/jpeg'); imagejpeg($image); ?> Then, in your HTML file, the image tag should look like this: <img src="image_output.php" /> -
[SOLVED] adding an image in the middle of some text on an HTML form
void replied to DataRater's topic in PHP Coding Help
nohow. you got to have an html page with an <img/> tag, which src attribute should be a php script. otherwise, you can output only an image to your browser. -
$message variable must include all the data you got there. e.g. $message = $name."\n".$lastname."\n".$age; .... !jazz showed you the proper use of mail() function.
-
you need to set the right permissions for the directory, where the pictures are uploaded. most FTP client software (eg. FileZilla, right click on dir/file -> File attributes) have this functionality. also - PHP: chmod("path/to/image/dir", 0777); (this should be done once.)
-
Your <form> tag is missing parameter enctype="multipart/form-data".
-
Is there anything wrong with MySQL UPDATE statement ?
void replied to mistypotato's topic in PHP Coding Help
are you sure there's a record with the id you're trying to update? does field `Custnum` have to be capitalized? -
Is there anything wrong with MySQL UPDATE statement ?
void replied to mistypotato's topic in PHP Coding Help
structure of the `customers` table would be helpful. -
it really should work. maybe you could show us more code you have in there?
-
if i understood right, try $pattern2 = '/^News$/i';
-
That might be teh issue are you sure? but the `./program.out` works just fine! where should i search for the error message, if it doesn't execute my file?
-
yes, i understand, i'm echo'ing it.
-
thanks for reply. what permission issue could it be? i chmod'ed everything 777, but that didn't help. commands such as `mkdir` work fine. no, sh ./program.out doesn't work. even in ssh, it gives `cannot execute binary file` error. any other ideas?..
-
Hi there, i've got a problem with shell_exec(). the function itself works just fine, but i can't get it to execute a c++ compiled file. what i'm trying to do is running shell_exec("./program.out"), but it returns no output, not even an error or some kind. the script doesn't do it's job, also. What could possibly be wrong? Thanks in advance.
-
Yea, so I need a solution for a shared session file. What would you guys suggest? Of course, sessions for completely other applications on the secondary server should not be disturbed. Maybe it's possible to have several session data files?