GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need something coding in php? (https://gfy.com/showthread.php?t=813078)

Sam Granger 03-06-2008 08:06 AM

Need something coding in php?
 
Hey guys,

I'm looking to fill my portfolio a bit. I'm offering 2 free PHP5 coding spots. Not going to create anything you will resell. Must be for your personal use. And do not ask something huge, I'm doing this for free. Looking forward to seeing some requests. :thumbsup

Chris 03-06-2008 08:12 AM

i actaully do


i need a script where i can input something into a field

for example

[email protected]

it writes it to list.txt
if already in the list
lets me know

list formated like

[email protected],[email protected],[email protected]

Chris 03-06-2008 08:14 AM

i already have one code but it doesnt work on my server

Code:

<HTML>
<HEAD><TITLE></TITLE></HEAD>
<BODY>
<?
if ($_POST['data'] != "") {
  $filedata=@explode(",",@file_get_contents("file.txt"));
  if ($filedata != "") {
    if (array_search($_POST['data'],$filedata) == FALSE) {
      $filedata[]=$_POST['data'];
      file_put_contents("file.txt",implode(","$filedata));
      echo "<h2>data added to file</h2><br /><br />";
    } else {
      echo "<h2>data already exists in file</h2><br /><br />";
    }
  } else {
      $filedata=array();
      $filedata[]=$_POST['data'];
      file_put_contents("file.txt",implode(","$filedata));
      echo "<h2>data added to file</h2><br /><br />";
  }
}


?>

<FORM method="post" action="<? echo($_SERVER['PHP_SELF']); ?>">
<input type="text" size="30" maxlength="255" name="data">
</FORM>
</BODY>
</HTML>

spits out Parse error: syntax error, unexpected T_VARIABLE in /usr/www/virtual/jupzchris/www.jupzchris.com/email.php on line 10

Nookster 03-06-2008 10:38 AM

Quote:

Originally Posted by Chris (Post 13882003)
i already have one code but it doesnt work on my server

Code:

<HTML>
<HEAD><TITLE></TITLE></HEAD>
<BODY>
<?
if ($_POST['data'] != "") {
  $filedata=@explode(",",@file_get_contents("file.txt"));
  if ($filedata != "") {
    if (array_search($_POST['data'],$filedata) == FALSE) {
      $filedata[]=$_POST['data'];
      file_put_contents("file.txt",implode(","$filedata));
      echo "<h2>data added to file</h2><br /><br />";
    } else {
      echo "<h2>data already exists in file</h2><br /><br />";
    }
  } else {
      $filedata=array();
      $filedata[]=$_POST['data'];
      file_put_contents("file.txt",implode(","$filedata));
      echo "<h2>data added to file</h2><br /><br />";
  }
}


?>

<FORM method="post" action="<? echo($_SERVER['PHP_SELF']); ?>">
<input type="text" size="30" maxlength="255" name="data">
</FORM>
</BODY>
</HTML>

spits out Parse error: syntax error, unexpected T_VARIABLE in /usr/www/virtual/jupzchris/www.jupzchris.com/email.php on line 10

Change line 10, that reads:
file_put_contents("file.txt",implode(","$filedata) );
change it to:
file_put_contents("file.txt",implode(",",$filedata ));

You're welcome. :)

Sam Granger 03-06-2008 04:22 PM

Well chris looks like your problem has been solved. Still looking for 2 spots. About to go to bed, just got back from a night out. I'll reply in the morning.

Kelli58 03-07-2008 07:54 AM

What is your ICQ? I have a small, very tiny in fact - project in mind for you. But would rather discuss the details in private.

Sam Granger 03-07-2008 07:56 AM

262613995 :thumbsup

wizzart 03-07-2008 08:04 AM

Need image crop tutorial in PHP please?

Sam Granger 03-07-2008 08:07 AM

Quote:

Originally Posted by wizzart (Post 13889833)
Need image crop tutorial in PHP please?

Tutorial? Or script?

I'm only interested in writing scripts at the moment.

Kelli58 03-07-2008 01:10 PM

Turn your ICQ on already. :P


All times are GMT -7. The time now is 11:02 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123