Aimless
-
Posts
16 -
Joined
-
Last visited
Never
Posts posted by Aimless
-
-
I've already got 250 rows of date's stored in a text format. Is there absolutely no way to do this?
-
Hey there,
I'm calculating the current date like so
$currentdate = date('d-m-Y', strtotime('+0 days'));
So let's say a MYSQL field has a date of : 25-04-2011 in the format d-m-Y, and I want to return all of the rows that have a date that is -100 to +10 days compared to $currentdate, how do I do this?
Any help is much appreciated.
Best Regards,
Aimless
-
I can't seem to get that to work, are there any other ways to get this to work?
-
Hi,
I'm trying to create a dropdown box that is filled by a mysql column. I found this example, which fills the dropdown box with a list of columns in the database, but I want to fill the drop down box with the content in a column.
Any guidance on how to do this would be appreciated.
Thank you!
Example:
$connection = mysql_connect("localhost","username","password"); $fields = mysql_list_fields("database", "table", $connection); $columns = mysql_num_fields($fields); echo "<form action=page_to_post_to.php method=POST><select name=Field>"; for ($i = 0; $i < $columns; $i++) { echo "<option value=$i>"; echo mysql_field_name($fields, $i); } echo "</select></form>";
-
No worries, I worked out how to do it in a simple way, thanks for your help guys
-
This may not be appropriate but I haven't had any luck with what you guys have kindly suggested, so if anyone can make those three little segments of code in the original post I will PayPal them $3 as thanks, please PM or MSN me(trunetworkenquiries@gmail.com) if you can do it.
-
Are you sure I have to read it, can someone provide me an example of this?
-
Hi,
Thanks but no luck.
public function Start() { require('auth.php'); require('GetServer.php'); //$this->Run('start /D "'.GAME_DIRECTORY.'" /B '.GAME_BIN_NAME); popen("/samp/samp", "r"); // return true; }
popen("/samp/samp", "r");
It's not doing anything!
Can someone tell me how to start an application in linux, my application is located at /samp/samp, an example on how to start it will do
-
First person to help will get a $1 as thanks
-
Can someone please tell me what this code:
private function Run($sCommand) { require('auth.php'); require('GetServer.php'); $sCommand = 'cmd /C '.$sCommand; $oShell = new COM("WScript.Shell"); $oShell->Run($sCommand, 0, false); return true; } public function Start() { require('auth.php'); require('GetServer.php'); $this->Run('start /D "'.GAME_DIRECTORY.'" /B '.GAME_BIN_NAME); return true; } public function Stop() { require('auth.php'); require('GetServer.php'); $this->Run('taskkill /F /IM '.GAME_BIN_NAME.' /T'); return true; }
would be for Linux, this is working fine to Start and Stop applications on Windows but of course not for Linux as I need to change some of the code, but I'm not sure what to change.
All help very much appreciated.
-
Why you have kept the "." around GAME_DIRECTORY?
you have defined the constant like - define("GAME_DIRECTORY", $row['path']);
then use as below
$ft["settings"]["DIR"] = GAME_DIRECTORY ;
Let us know what error you are facing?
Thanks
Of course, thank you!
-
What's wrong with:
$ft["settings"]["DIR"] = .GAME_DIRECTORY. ;
.GAME_DIRECTORY. has previously been defined as:
define("GAME_DIRECTORY", $row['path']);
Thanks,
-
Doesn't seem to be working
INSERT INTO members(firstname, lastname, login, passwd, path, bin, server, port, srv, due, payment, ftp, admin) VALUES('$fname','$lname','$login','".md5($_POST['password'])."','$path','$bin','$server','$port','$srv','$due','$payment','$ftp','$admin')";
-
Can anyone give me a working example, of how to CD to .GAME_DIRECTORY. and then run .GAME_BIN_NAME.
Can't seem to get exec() or shell_exec() to work.
Any help appreciated.
Thanks!
-
Hey,
I'm trying to start an application, here's what I've got so far:
$WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run("cd ".GAME_DIRECTORY." ; nohup ./".GAME_BIN_NAME." &", 0, $m);
When I execute this code nothing happens, it doesn't seem to be starting the application.
Can anyone tell me how to start my application, I first need to CD to .GAME_DIRECTORY. and then run .GAME_BIN_NAME.
Returning rows where date is...
in PHP Coding Help
Posted
Thanks for your help.