![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
only one
Members-
Posts
437 -
Joined
-
Last visited
Never
Everything posted by only one
-
cron, if you dont want to have to visit a page everyday
-
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"; } ?>
-
$id=$_GET['id']; $test=$_GET['test'];
-
check phpinfo(); and see if the mail function is on
-
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
-
can you use javascript with mysql, or would it be better just to use .txt or .ini?
-
i was wondering the exact same thing
-
contact your provider
-
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
-
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
-
[SOLVED] Mang the change from sessions to cookies
only one replied to almightyegg's topic in PHP Coding Help
<?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 -
<?php phpinfo(); ?> that will only show the the functions that are allowed and stuff on the server, if php is installed
-
[SOLVED] Mang the change from sessions to cookies
only one replied to almightyegg's topic in PHP Coding Help
and if you havent already realised, exit(); or die(); both terminate the rest of the page -
[SOLVED] Mang the change from sessions to cookies
only one replied to almightyegg's topic in PHP Coding Help
at the bottom of the page <? } </td> </table> <center> <? include 'links.php'; ?> </center> </body> </html> you open a tag, and dont close it.. -
[SOLVED] Mang the change from sessions to cookies
only one replied to almightyegg's topic in PHP Coding Help
if($email==NULL|$password==NULL){ -
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..
-
dont help him he looks like a teacher
-
get a different web host :-\
-
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]"; ?>
-
<?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
-
header("location: the url");
-
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
-
you might wanna global it aswell
-
o i see what you want now while($wickets<10){ $wickets = $wickets + 1;
-
while($whicks<10){