Jump to content

only one

Members
  • Posts

    437
  • Joined

  • Last visited

    Never

Everything posted by only one

  1. cron, if you dont want to have to visit a page everyday
  2. im not sure :-\, dont forget to put {s after you open a function (edited lol, wtf is a finction ???) <?php $connect = mssql_connect("***","***", "***") or die("Could not connect"); $result = mssql_select_db("***") or die("Could not select that database !"); error_reporting(0); // To send HTML mail, the Content-type header must be set $from = "From: Form Results <test@domain.com>"; $to = "badgoat@domain.com"; $subject = "TEST"; $body = ($_POST['name'] . "\r" . $_POST['phone'] . "\r" . $_POST['email'] . "\r" . $_POST['comments'] . "\r\n"); $email=$_POST['email']; if(mail($from,$to,$subject,$body)){ echo "Data Recieved Successfully"; }else{ echo "MAIL FAILED"; } ?>
  3. $id=$_GET['id']; $test=$_GET['test'];
  4. check phpinfo(); and see if the mail function is on
  5. well you can type in the html an then set the php inside it.. eg <html> <head></head> <body> <?php here ?> </body> </html> and if youre using an if, while loop or any function like that you can just close the php and continue with your html without using and echo or print
  6. can you use javascript with mysql, or would it be better just to use .txt or .ini?
  7. i was wondering the exact same thing
  8. just dont let them upload a video bigger than 30mb if the server your on is slow and their connection is slow, if you want it to be anybigger id advice using flash
  9. is this specific site on the same webhost as the rest? has that webhost recently got new servers? if they have not everything might be working right yet
  10. <?php include 'db.php'; $email = $_COOKIE['email']; $password = $_COOKIE['password']; if((!$email) || (!$password)){ echo "Please enter ALL of the information! <br />"; header("location: index.php"); } ?> try using a header, then see what happens
  11. <?php phpinfo(); ?> that will only show the the functions that are allowed and stuff on the server, if php is installed
  12. and if you havent already realised, exit(); or die(); both terminate the rest of the page
  13. at the bottom of the page <? } </td> </table> <center> <? include 'links.php'; ?> </center> </body> </html> you open a tag, and dont close it..
  14. your doing it wrong, if youve got it in a seperate table: mysql_query(SELECT * FROM your table); now that yue got all the results, to upate it use $amount = mysql_num_row(mysql_query(SELECT * FROM your table WHERE username=username)); if($amount>1){ update the value }else{ insert all infromation..
  15. get a different web host :-\
  16. if its for members, as in people registed on your website, id just have a last active time feild in your database.... in this format date("YmdHi"); now add 15 or something to it this will return the yearmonthdayhourminute eg. 200704032241 get the current time, with this format again then if(date(YmdHi<last active feild){ do the shit full code: <?php $time = date("YmdHi"); $query = mysql_query("SELECT * FROM yourtable WHERE lastactive > $time"); //edit this to suit you $row = mysql_fetch_array($query)); $number = mysql_num_rows($query); //number of people online echo "number of people active in last 15 minutes: $number<br /><br /> people active in last 15 minutes:<br/> $row[username]"; ?>
  17. <?php $path = ""; if (!isset($HTTP_POST_FILES['userfile'])){ echo " <FORM ENCTYPE=multipart/form-data ACTION=?page=Upload METHOD=POST> <p>The file:<br> <INPUT TYPE=file NAME=userfile><br /> <INPUT TYPE=submit VALUE=Upload> </p> </FORM> "; }else{ if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) { if (($HTTP_POST_FILES['userfile']['type']=="image/gif") || ($HTTP_POST_FILES['userfile']['type']=="image/pjpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/jpeg") || ($HTTP_POST_FILES['userfile']['type']=="image/png")) { if (file_exists($path . $HTTP_POST_FILES['userfile']['name'])) { echo "The file already exists, try calling your file a different name.<br>"; }else{ $res = copy($HTTP_POST_FILES['userfile']['tmp_name'], $path . $HTTP_POST_FILES['userfile']['name']); if (!$res) { echo "upload failed!<br>"; exit; } else { echo "upload sucessful<br><br>"; } echo "File Name: ".$HTTP_POST_FILES['userfile']['name']."<br>"; echo "File Path: <a href=uploads/".$HTTP_POST_FILES['userfile']['name']." TARGET=_BLANK>uploads/".$HTTP_POST_FILES['userfile']['name']."</a><br>"; echo "File Size: ".$HTTP_POST_FILES['userfile']['size']." bytes<br>"; echo "File Type: ".$HTTP_POST_FILES['userfile']['type']."<br>"; echo "<img src=uploads/".$HTTP_POST_FILES['userfile']['name']."><br>"; }}}} ?> hasent been tested! ive put some extra file types in there aswell
  18. just do it like bbcode $bbcode = array('www.', '.com', 'www', 'com'); $html = array('', '', '', ''); $output = preg_replace($bbcode, $html, $output); please edit bold bits, and you might want to add more things in the bbcode array, like http:// .net net. i could go on all day
  19. you might wanna global it aswell
  20. o i see what you want now while($wickets<10){ $wickets = $wickets + 1;
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.