---
title: "Hjälp med funtion som gör att admin ska godsänna bannern att den sysn eller inte"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/110873-hjälp-med-funtion-som-gör-att-admin-ska-godsänna-bannern-att-den-sysn-eller-inte"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "mikaelweb"
published: "2004-09-05T18:14:30.000Z"
updated: "2004-09-08T20:14:01.000Z"
replies: 17
views: 461
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/110873-hjälp-med-funtion-som-gör-att-admin-ska-godsänna-bannern-att-den-sysn-eller-inte"
---

# Hjälp med funtion som gör att admin ska godsänna bannern att den sysn eller inte

## #1 — mikaelweb, 2004-09-05T18:14Z

min fråga är hur kan man göra så att admin måste godsänna banner att den syns eller inte syns typ 0 eller 1

ansöknins del till den

```php
<?				
echo "<link href='css/style.css' rel='stylesheet' type='text/css'> <font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>» 
Affiliation rulez</font> 
<table width='400' border='0' cellspacing='0' cellpadding='0'>
  <tr> 
    <td><font color='#666666'><img src='imgs/linemw.gif' width='100%' height='5'></font></td>
  </tr>
</table>
<font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>+</font> 
<font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>important: 
u will have to link me. otherwise don´t even submit your site!<br>
<br>
+ No rasism.<br>
+ No warez.<br>
+ No Pornografi.<br>
+ All other kind of material which can offend people.<br>
+ High count of uniq visitors.<br>
+ If you break the rulez i might cancel our affiliation immediate without warning.<br>
<br>
<br>
» Upload data</font> 
<table width='400' border='0' cellspacing='0' cellpadding='0'>
  <tr> 
    <td><font color='#666666'><img src='imgs/linemw.gif' width='100%' height='5'></font></td>
  </tr>
</table>
<font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>+ 
The button has to be exactly 88x31 pixel in size, .gif and has the maximum filesize 
of 20480 bytes.<br>
+ use on your button file, the same name as your site.<br>
+ All of your website data will be automatically showed in the affiliation section. 
</font><font size='1' face='Verdana, Arial, Helvetica, sans-serif'><br>
<br>
<br>
</font>
<table width='387' border='0' cellpadding='0' cellspacing='0'>
  <form name='form1' method='post' action='upload.php' enctype='multipart/form-data' onsubmit='return checkform()'>
    <tr> 
      <td width='106'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>Name:</font></td>
      <td width='260'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
        <input id='wmname' name='wmname' type='text' class='editbox' size='48'>
        </font></td>
    </tr>
    <tr> 
      <td><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>E-mail:</font></td>
      <td><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
        <input type='text' id='wmemail' name='wmemail' class='editbox' size='48'>
        </font></td>
    </tr>
    <tr> 
      <td width='106'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>Site 
        name:</font></td>
      <td width='260'><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
        <input id='sitename' name='sitename' type='text' class='editbox' size='48'>
        </font></td>
    </tr>
    <tr> 
      <td><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>Site url:</font></td>
      <td><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
        <input id='sitelink' name='sitelink' class='editbox' size='48' value='http://'>
        </font></td>
    </tr>
    <tr> 
      <td><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>Upload button:</font></td>
      <td><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
        <input type='file' size='36' name='imagefile' class='editbox' maxlength='255'>
        <input type='hidden' name='MAX_FILE_SIZE' value='20480'>
        </font></td>
    </tr>
    <tr> 
      <td></td>
      <td><font size='1' face='Verdana, Arial, Helvetica, sans-serif'>
        <input type='submit' id='Submit' name='Submit' value='Submit' class='button2'>
        <input type='reset' id='Submit12' name='Submit1' value=' Reset ' class='button2'>
        </font></td>
    </tr>
  </form>
</table>
<font size='1' face='Verdana, Arial, Helvetica, sans-serif'><br>
<br>
<font color='#9CA1B4'>» </font>In case you need, please use <a href=\'mail.php\'>this</a> 
form to contact me.</font>";
?>
```

 

affilaites script

```php
<?
/*
This works with mysql as u can see. This only write out the tables and so on and so on.
U can add things to the DB or remove, this will works fine :p
I don´t use any form to add the thinks to the DB.

If u wanna use this i think u just have to change the first table size(387)
And the colors i´m using.
*/
include "tdata.php";
//-------------------
echo"<table width='350' border='0' cellpadding='0' cellspacing='0'>
     <tr><td></td></tr><tr><td>
	 <table width='350' border='0' cellpadding='0' cellspacing='0'>
	 <tr>";

//--- Write out the first button -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
$bts = 0;
$result = mysql_query("SELECT * FROM affillisteng ORDER BY RAND()");
$row = mysql_fetch_array($result);
$id = $row[id];
echo"<td><table width='88' height='31' border='0' cellpadding='2' cellspacing='1' bgcolor='#ffffff'>
    <tr><td bgcolor='#ffffff'><div align='center'><a href='inouteng.php?outid=$id' target='_blank'>
	<IMG SRC='$row[st_button]' WIDTH=88 HEIGHT=31 ALT='$row[st_name]
In: $row[countin] |  Out: $row[countout]' border='0' style='filter:alpha(opacity=50)' onMouseOver='nereidFade(this,100,60,15)' onMouseOut='nereidFade(this,50,75,15)'></a></div></td></tr>       
	<tr><td></td></tr></table></td>";
//---- all next buttons ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
while($row = mysql_fetch_array($result)){
$id = $row[id];
//----- This will "br" after write 3 buttons per line, in this case will close </tr> tag and open a new one ----------------------------------------------------------------------------------------------------------
if($bts == 3){
    echo "</tr><tr><td><table width='88' height='31' border='0' cellpadding='2' cellspacing='1' bgcolor='#ffffff'>
    <tr><td bgcolor='#ffffff'><div align='center'><a href='inouteng.php?outid=$id' target='_blank'><IMG SRC='$row[st_button]' WIDTH=88 HEIGHT=31 ALT='$row[st_name]
In: $row[countin] | Out: $row[countout]' border='0' style='filter:alpha(opacity=50)' onMouseOver='nereidFade(this,100,60,15)' onMouseOut='nereidFade(this,50,75,15)'></a></div></td></tr>       
	<tr><td></td></tr></table></td>";
	$bts = 0;
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
else{
	echo "<td><table width='88' height='31' border='0' cellpadding='2' cellspacing='1' bgcolor='#ffffff'>
    <tr><td bgcolor='#ffffff'><div align='center'><a href='inouteng.php?outid=$id' target='_blank'><IMG SRC='$row[st_button]' WIDTH=88 HEIGHT=31 ALT='$row[st_name]
In: $row[countin] |  Out: $row[countout]' border='0' style='filter:alpha(opacity=50)' onMouseOver='nereidFade(this,100,60,15)' onMouseOut='nereidFade(this,50,75,15)'></a></div></td></tr>       
	<tr><td></td></tr></table></td>";
	$bts++;
 }
}
echo "</tr></table><tr><td><br>
    <div align='center'><font color='#333333' size='1' face='Verdana, Arial, Helvetica, sans-serif'></font></div></td></tr></tr></td></table>";
mysql_close();
?>
```

 

upload till detta script

```php
<?
$uploaddir = "/home/mikaelw/public_html/links/"; 
if(isset($Submit))
{
					 if(($HTTP_POST_FILES['imagefile']['type'] == "image/gif") || ($HTTP_POST_FILES['imagefile']['type'] == "image/.jpg")){
        			 $file_realname = trim($HTTP_POST_FILES['imagefile']['name']);
    				 move_uploaded_file($HTTP_POST_FILES['imagefile']['tmp_name'], $uploaddir . $file_realname) 
   					 or die ("<b><font color='#9CA1B4'>Ohhhhhhhhhhhhhh!</font></b><br>
		 			 I could not copy your button :(<br><br>
			 		 <font color='#EB7D05'>« </font><a href=\"javascript:history.go(-1)\">Lets try again!</a>");

					 include "tdata.php";
					 // -----------------
					 $sitebutton = "links/$file_realname";		
					 mysql_query("insert into affillisteng  (countout,countin,wm_name,wm_email,st_name,st_link,st_button) values ('0', '0', '$wmname', '$wmemail', '$sitename', '$sitelink', '$sitebutton')");
					 $result = mysql_query("SELECT * FROM affillisteng WHERE st_name='$sitename'");
					 $row = mysql_fetch_array($result);
					 $xis = "http://www.mikaelweb/inouteng.php?inid=";
        			 echo "<b><font color='#9CA1B4'>Congratulations</font></b><br>
		      		 you´r now my partner :p<br><br>
		      		 Please download my button and use this url to link me:<br>
			  		 <font color='#9CA1B4'>$xis$row[id]</font><br><br>
			  		 <font color='#EB7D05'>« </font><a href=\"affiliates.php\">Lets see if i put your button correctly!</a>";
        			} 
					else{
					   echo "<b><font color='#9CA1B4'>Ohhhhhhhhhhhhhhhh!</font></b><br>
		               I could not copy your button :(<br>
				       Wrong Filetype (<font color='#9CA1B4'>".$HTTP_POST_FILES['imagefile']['name']."</font>)<br><br>
			           <font color='#EB7D05'>« </font><a href=\"javascript:history.go(-1)\">Lets try again!</a>";             
					 	}
				}
?>
```

Permalänk: https://www.webforum.nu/p/110873

## #2 — Pedda, 2004-09-05T21:06Z

Lägg till ett fältet status i databasen

upload.php
Ändra till

```php
insert into affillisteng   (countout,countin,wm_name,wm_email,st_name,st_link,st_button, status) values ('0', '0', '$wmname', '$wmemail', '$sitename', '$sitelink', '$sitebutton', '0'
```

I din admin del får du fixa så du kan ändra status till 1 när du godkänner

Och i affiliates skriptet får du ändra till 

```php
SELECT * FROM affillisteng WHERE status = 1 ORDER BY RAND()
```

Permalänk: https://www.webforum.nu/p/1428650

## #3 — mikaelweb, 2004-09-06T09:11Z

den del funkar bra nu men hur ska jag få den att maila mig med om det finns någon som har regga sig

```php
<?
$uploaddir = "/home/mikaelw/public_html/links/"; 
if(isset($Submit))
{
					 if(($HTTP_POST_FILES['imagefile']['type'] == "image/gif") || ($HTTP_POST_FILES['imagefile']['type'] == "image/.jpg")){
        			 $file_realname = trim($HTTP_POST_FILES['imagefile']['name']);
    				 move_uploaded_file($HTTP_POST_FILES['imagefile']['tmp_name'], $uploaddir . $file_realname) 
   					 or die ("<b><font color='#9CA1B4'>Ohhhhhhhhhhhhhh!</font></b><br>
		 			 I could not copy your button :(<br><br>
			 		 <font color='#EB7D05'>« </font><a href=\"javascript:history.go(-1)\">Lets try again!</a>");

					 include "tdata.php";
					 // -----------------
					 $sitebutton = "links/$file_realname";		
					 mysql_query("insert into affillisteng (countout,countin,wm_name,wm_email,st_name,st_link,st_button,status) values ('0', '0', '$wmname', '$wmemail', '$sitename', '$sitelink', '$sitebutton', '0')");
					 $result = mysql_query("SELECT * FROM affillisteng WHERE st_name='$sitename'");
					 $row = mysql_fetch_array($result);
					 $xis = "http://www.mikaelweb/inouteng.php?inid=";
        			 echo "<p><b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>Congratulations</font></b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><br>
  you´r now my partner :p</font></p>
<p><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>Admin 
  will approve your site soon</font></b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><br>
  your button will not be on the site before that</font><br>
  <br>
  Please download my button and use this url to link me:<br>
  $xis$row[id]<br>
  <br>
  + <a href=\"affiliates.php\">Lets see if i put your button correctly!</a>"; 
  } else{ echo "<b>Ohhhhhhhhhhhhhhhh!</b><br>
  I could not copy your button :(<br>
  Wrong Filetype (".$HTTP_POST_FILES['imagefile']['name'].")<br>
  <br>
  + <a href=\"javascript:history.go(-1)\">Lets try again!</a></font>></p>";  
       
					 	}
				}
?>
```

 

ska den vara på detta fil ????

samt hur kan man byta namn på filerna om namnet blit nisse ska den bli 01 02 03 04 05 och så vidare

Permalänk: https://www.webforum.nu/p/1428815

## #4 — Pedda, 2004-09-06T15:43Z

Lägg in

```php
mail("din@mail.com", "Ny affiliate", "Rad 1\nRad 2\nRad 3");
```

 efter SQL satsen.

Exakt vad vill du döpa om till? Ska dom kunna ladda upp mer än 1 bild?
Om dom ska kunna ladda upp endast en bild så är det enklast att döpa bilden till $sitename eller nåt sånt.

Permalänk: https://www.webforum.nu/p/1432013

## #5 — mikaelweb, 2004-09-06T16:46Z

okey hur göra jag det då

Permalänk: https://www.webforum.nu/p/1432055

## #6 — mikaelweb, 2004-09-06T16:56Z

```php
<?
$uploaddir = "/home/mikaelw/public_html/links/"; 
if(isset($Submit))
{
					 if(($HTTP_POST_FILES['imagefile']['type'] == "image/gif") || ($HTTP_POST_FILES['imagefile']['type'] == "image/.jpg")){
        			 $file_realname = trim($HTTP_POST_FILES['imagefile']['name']);
    				 move_uploaded_file($HTTP_POST_FILES['imagefile']['tmp_name'], $uploaddir . $file_realname) 
   					 or die ("<b><font color='#9CA1B4'>Ohhhhhhhhhhhhhh!</font></b><br>
		 			 I could not copy your button :(<br><br>
			 		 <font color='#EB7D05'>« </font><a href=\"javascript:history.go(-1)\">Lets try again!</a>");

					 include "tdata.php";
					 // -----------------
					 $sitebutton = "links/$file_realname";		
					 mysql_query("insert into affillisteng (countout,countin,wm_name,wm_email,st_name,st_link,st_button,status) values ('0', '0', '$wmname', '$wmemail', '$sitename', '$sitelink', '$sitebutton', '0')");					
					 $result = mysql_query("SELECT * FROM affillisteng WHERE st_name='$sitename'");
					 $row = mysql_fetch_array($result);
					 $xis = "http://www.mikaelweb/inouteng.php?inid=";
					 mail("webmaster@mikaelweb.com.com", "Ny affiliate", "st_name\st_link\wm_email");
        			 echo "<p><b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>Congratulations</font></b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><br>
  you´r now my partner :p</font></p>
<p><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>Admin 
  will approve your site soon</font></b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><br>
  your button will not be on the site before that</font><br>
  <br>
  Please download my button and use this url to link me:<br>
  $xis$row[id]<br>
  <br>
  + <a href=\"affiliates.php\">Lets see if i put your button correctly!</a>"; 
  } else{ echo "<b>Ohhhhhhhhhhhhhhhh!</b><br>
  I could not copy your button :(<br>
  Wrong Filetype (".$HTTP_POST_FILES['imagefile']['name'].")<br>
  <br>
  + <a href=\"javascript:history.go(-1)\">Lets try again!</a></font></p>";  
       
					 	}
				}
?>
```

 

detta funkar inte 

```php
mail("din@mail.com", "Ny affiliate", "Rad 1\nRad 2\nRad 3");
```

Permalänk: https://www.webforum.nu/p/1432062

## #7 — Pedda, 2004-09-06T18:29Z

Har din mailadress verkligen com.com i slutet?

Permalänk: https://www.webforum.nu/p/1432132

## #8 — mikaelweb, 2004-09-06T18:59Z

nej det har den inte

hur får jag den att byta namn på filer då

Permalänk: https://www.webforum.nu/p/1432163

## #9 — mikaelweb, 2004-09-06T19:28Z

måste kunna byta namn på filen on det finns en redan med samma namn

samt detta med mail så man ser vilken site address med mera

```php
<?
$uploaddir = "/home/mikaelw/public_html/links/"; 
if(isset($Submit))
{
					 if(($HTTP_POST_FILES['imagefile']['type'] == "image/gif") || ($HTTP_POST_FILES['imagefile']['type'] == "image/.jpg")){
        			 $file_realname = trim($HTTP_POST_FILES['imagefile']['name']);
    				 move_uploaded_file($HTTP_POST_FILES['imagefile']['tmp_name'], $uploaddir . $file_realname) 
   					 or die ("<b><font color='#9CA1B4'>Ohhhhhhhhhhhhhh!</font></b><br>
		 			 I could not copy your button :(<br><br>
			 		 <font color='#EB7D05'>« </font><a href=\"javascript:history.go(-1)\">Lets try again!</a>");

					 include "tdata.php";
					 // -----------------
					 $sitebutton = "links/$file_realname";		
					 mysql_query("insert into affillisteng (countout,countin,wm_name,wm_email,st_name,st_link,st_button,status) values ('0', '0', '$wmname', '$wmemail', '$sitename', '$sitelink', '$sitebutton', '0')");					
					 $result = mysql_query("SELECT * FROM affillisteng WHERE st_name='$sitename'");
					 $row = mysql_fetch_array($result);
					 $xis = "http://www.mikaelweb/inouteng.php?inid=";
                     mail("webmaster@mikaelweb.com", "New affiliate at international", "Login to admin panel and put status 1 to this site or delete this site if you don´t like it");
        			 echo "<p><b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>Congratulations</font></b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><br>
  you´r now my partner :p</font></p>
<p><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>Admin 
  will approve your site soon</font></b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><br>
  your button will not be on the site before that</font><br>
  <br>
  Please download my button and use this url to link me:<br>
  $xis$row[id]<br>
  <br>
  + <a href=\"affiliates.php\">Lets see if i put your button correctly!</a>"; 
  } else{ echo "<b>Ohhhhhhhhhhhhhhhh!</b><br>
  I could not copy your button :(<br>
  Wrong Filetype (".$HTTP_POST_FILES['imagefile']['name'].")<br>
  <br>
  + <a href=\"javascript:history.go(-1)\">Lets try again!</a></font></p>";  
       
					 	}
				}
?>
```

Permalänk: https://www.webforum.nu/p/1432199

## #10 — Pedda, 2004-09-07T17:57Z

```php
mail("webmaster@mikaelweb.com", "New affiliate at international", "".$row['sitename']." want to become a affiliate.\n\nLogin to admin panel and put status 1 to this site or delete this site if you don´t like it\nhttp://www.mikaelweb.com/adminpanel.php?id=".$row['id']."", "From: [email]webmaster@mikaelweb.com[/email]");
```

 

För att kolla om filen redan finns använder du 

```php
if (file_exists($uploaddir.$HTTP_POST_FILES['imagefile']['name']))
```

 Ska de kunna ha flera bilder eller bara en?
Om det bara är en så behöver du ju inte kolla om det redan finns en, eftersom den kommer ersättas av den nya bilden. Men då måste du döpa den till något relaterat till affiliaten, t.ex $id.

Permalänk: https://www.webforum.nu/p/1432796

## #11 — mikaelweb, 2004-09-07T18:20Z

Hur ska man göra det då

Men då måste du döpa den till något relaterat till affiliaten, t.ex $id.

Permalänk: https://www.webforum.nu/p/1432809

## #12 — Pedda, 2004-09-07T19:12Z

Då får vi flytta runt i koden lite så du sparar bilden efter att du har lagt in i databasen.

```php
if(($HTTP_POST_FILES['imagefile']['type'] == "image/gif") || ($HTTP_POST_FILES['imagefile']['type'] == "image/.jpg")){
$file_realname = trim($HTTP_POST_FILES['imagefile']['name']);

include "tdata.php";
// -----------------       
mysql_query("insert into affillisteng  (countout,countin,wm_name,wm_email,st_name,st_link,status) values ('0', '0', '$wmname', '$wmemail', '$sitename', '$sitelink', '0')");                    
$result = mysql_query("SELECT * FROM affillisteng WHERE st_name='$sitename'");
$row = mysql_fetch_array($result);
move_uploaded_file($HTTP_POST_FILES['imagefile']['tmp_name'], $uploaddir . $row['id']) or die ("<b><font color='#9CA1B4'>Ohhhhhhhhhhhhhh!</font></b><br> I could not copy your button <img src="images/wfstandard/smilies/frown.gif" border="0" alt=""><br><br><font color='#EB7D05'>« </font><a href=\"java script:history.go(-1)\">Lets try again!</a>");
```

 Observera att koden är otestad då jag inte har någon server installerad för tillfället. :l

Permalänk: https://www.webforum.nu/p/1432847

## #13 — mikaelweb, 2004-09-07T19:42Z

```php
<?
// This is your upload dir.
$uploaddir = "/home/mikaelw/public_html/links/"; 
if(isset($Submit))
{ // This is your upload funtion.
if(($HTTP_POST_FILES['imagefile']['type'] == "image/gif") || ($HTTP_POST_FILES['imagefile']['type'] == "image/.jpg")){
$file_realname = trim($HTTP_POST_FILES['imagefile']['name']);

include "tdata.php";
// -----------------       
mysql_query("insert into affillisteng  (countout,countin,wm_name,wm_email,st_name,st_link,status) values ('0', '0', '$wmname', '$wmemail', '$sitename', '$sitelink', '0')");                    
$result = mysql_query("SELECT * FROM affillisteng WHERE st_name='$sitename'");
$row = mysql_fetch_array($result);
move_uploaded_file($HTTP_POST_FILES['imagefile']['tmp_name'], $uploaddir . $row['id']) or die ("<b><font color='#9CA1B4'>Ohhhhhhhhhhhhhh!</font></b><br> I could not copy your button <img src="images/wfstandard/smilies/frown.gif" border="0" alt=""><br><br><font color='#EB7D05'>« </font><a href=\"java script:history.go(-1)\">Lets try again!</a>");
$xis = "http://www.mikaelweb/inout.php?inid=";
// This will e-mail to you when ther is new affiliate on your site.
 mail("webmaster@mikaelweb.com", "New affiliate", "".$row['sitename']." want to become a affiliate.\n\nLogin to admin panel and put status 1 to this site or delete this site if you don´t like it\nhttp://www.mikaelweb.com/adminpanel.php?id=".$row['id']."", "From: [email]webmaster@mikaelweb.com[/email]"); 
 // This will display if your file is uploaded  .   			 
    echo "<p><b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>Congratulations</font></b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><br>
  you´r now my partner <img src='shoutbox/smileys/tongue.gif' border='0' alt=''></font></p>
<p><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'>Admin 
  will approve your site soon</font></b><font color='#666666' size='1' face='Verdana, Arial, Helvetica, sans-serif'><br>
  your button will not be on the site before that</font><br>
  <br>
  Please download my button and use this url to link me:<br>
  $xis$row[id]<br>
  <br>
  + <a href=\"affiliateswe.php\">Lets see if i put your button correctly!</a>"; 
 // This will display if your file is Not uploaded.
  } else{ echo "<b>Ohhhhhhhhhhhhhhhh!</b><br>
  I could not copy your button <img src='shoutbox/smileys/frown.gif' border='0' alt=''><br>
  Wrong Filetype (".$HTTP_POST_FILES['imagefile']['name'].")<br>
  <br>            
					 	}
				}
?>
```

Permalänk: https://www.webforum.nu/p/1432881

## #14 — Pedda, 2004-09-07T20:53Z

Fungerade det?

Permalänk: https://www.webforum.nu/p/1432943

## #15 — mikaelweb, 2004-09-08T09:23Z

nej det gör den inte

Permalänk: https://www.webforum.nu/p/1433148

## #16 — Pedda, 2004-09-08T10:47Z

Varifrån får du värdet på $sitename i din SQL sats?
SELECT \* FROM affillisteng WHERE st_name='$sitename'

Är koden inte fullständig?
Ser mailet ok ut?

Permalänk: https://www.webforum.nu/p/1433192

## #17 — mikaelweb, 2004-09-08T11:25Z

får bara massa fel på det hela

```php
 move_uploaded_file($HTTP_POST_FILES['imagefile']['tmp_name'], $uploaddir . $row['id']) or die ("<b><font color='#9CA1B4'>Ohhhhhhhhhhhhhh!</font></b><br> I could not copy your button <img src="images/wfstandard/smilies/frown.gif" border="0" alt=""><br><br><font color='#EB7D05'>« </font><a href=\"java script:history.go(-1)\">Lets try again!</a>");
```

Permalänk: https://www.webforum.nu/p/1433222

## #18 — mikaelweb, 2004-09-08T20:14Z

hmmm det kommer inte att funka så jag lägger ner det hela

Permalänk: https://www.webforum.nu/p/1433598

---

Tråden på webben: https://www.webforum.nu/amne/php/110873-hjälp-med-funtion-som-gör-att-admin-ska-godsänna-bannern-att-den-sysn-eller-inte
