0 Members and 8 Guests are viewing this topic.
http://knowyourmeme.com/memes/are-you-serious-face-seriously
//SQL$con = mysql_connect($sql_server, $sql_username, $sql_pass); mysql_select_db($sql_db, $con); $supID = mysql_query( "SELECT LAST(id) AS LastOne FROM Files" );$row = mysql_fetch_array("LastOne");$ID = $row['id'];$ID= $row + 1; echo "ID is: " . $ID; mysql_query( 'INSERT INTO Files (id, username, server_id, file_type, date) VALUES ('(string)$ID . ',' . $username . ',' . (string)$server_id . ',' . $filetypo . ',' . $date . ')' ); mysql_close($con);
Can anyone help me?
$con = mysql_connect($sql_server, $sql_username, $sql_pass);mysql_select_db($sql_db, $con);$supID = mysql_query('SELECT id FROM Files ORDER BY id DESC LIMIT 1');$row = mysql_fetch_array($supID);$ID = $row['id'] + 1;echo 'ID is: ' . $ID;mysql_query('INSERT INTO Files (id, username, server_id, file_type, date) VALUES (' . $ID . ',' . $username . ',' . $server_id . ',' . $filetypo . ',' . $date . ')');mysql_close($con);
...PC vs Mac is like AK47 vs M4A1...
shit code was here
What if..?Code: [Select]mysql_select_db($sql_db, $con); $supID = mysql_query( 'SELECT id FROM Files DESC LIMIT 1' );$ID = mysql_result($supID) + 1;echo "ID is: " . $ID; mysql_query( 'INSERT INTO Files (id, username, server_id, file_type, date) VALUES (' . $ID . ',' . $username . ',' . $server_id . ',' . $filetypo . ',' . $date . ')' ); mysql_close($con);P.S. Ah, there is a reply already...
mysql_select_db($sql_db, $con); $supID = mysql_query( 'SELECT id FROM Files DESC LIMIT 1' );$ID = mysql_result($supID) + 1;echo "ID is: " . $ID; mysql_query( 'INSERT INTO Files (id, username, server_id, file_type, date) VALUES (' . $ID . ',' . $username . ',' . $server_id . ',' . $filetypo . ',' . $date . ')' ); mysql_close($con);
mysql_select_db($sql_db, $con); $supID = mysql_query( 'SELECT id FROM Files order by id DESC LIMIT 1' );list ($ID) = mysql_fetch_row($supID); mysql_query( 'INSERT INTO Files (id, username, server_id, file_type, date) VALUES (' . $ID . ',' . $username . ',' . $server_id . ',' . $filetypo . ',' . $date . ')' ); mysql_close($con);
Sorry for repling here again so soon, but you were so useful last time, so I decided to let you get fun with helping me again.Exactly, I wish to know how to move this:http://example.com/user.php?username=machinaInto this:http://example.com/user.php?=machinaOr even thing like that here:http://example.com/user/machinaThanks for any help
$user = $_SERVER['QUERY_STRING'];
Okay, the last thing (I hope so).Is it possible to get some file from external ftp server that has password we don't want to share and send it to user without downloading it on main website (where the user clicks download button). Would be nice to hide external ftp server's url but it's not so needed yet. Also, it might be impossible.
BTW, I'm now officially interested. What do you need it for?
Is it possible to get some file from external ftp server that has password we don't want to share and send it to user without downloading it on main website (where the user clicks download button). Would be nice to hide external ftp server's url but it's not so needed yet. Also, it might be impossible.
PHP's FTP client functions are easy enough to use - http://php.net/manual/en/book.ftp.php