PHP/MYSQL Inserting Multiple to textarea

this A Full code about my problem

i want make Insert multi data to my textarea


exmple :

if post

http://www.experts-exchange.com/m-ezzat/
http://www.experts-exchange.com//m-ezzat1/
http://www.experts-exchange.com//m-ezzat2/
http://www.experts-exchange.com//m-ezzat3/
http://www.experts-exchange.com//m-ezzat4/

the result must be

MyDomain like domain.com

http://www.domain.com.com/1/
http://wwwdomain.com//2/
http://www.domain.com//3/
http://www.domain.com//4/
http://wwwdomain.com//5/

My idea talk about Protection links

but i want insert every url to line in database

Inserting Multiple
Step 1
 
 
 
<form action="MultiDone/" method="post">
<table width="100%" border=0>
  <tbody>
  <tr>
    <td >File link:<br />
    <textarea rows="14" name="multiurls"  class="input"  cols="59"></textarea><br /></td></tr></tbody></table></td></tr><tr><td colspan="3" 
height="1%" width="738">
<p style="TEXT-AliGN: center" align=center><input class=submit type=submit value="Protect link &amp; Make It Short!" name=send></td> 
</form>
 
 
Step2
 
 
<?php
 
include_once("./includes/config.php") ;
 
$url   = $_POST['multiurls'];
 
 
if (!isset($url)) {
	print "please full all fields";
	
}
else {
$insert = "INSERT INTO `data` (`id` ,`url`) values (NulL ,'$url')";
$query  = mysql_query($insert);
if (!$query) die(mysql_error());
}
 
$select = "SELECT `id` FROM `data` WHERE `URL` = '$url'";
$amr = mysql_query($select);
if (!$amr) die(mysql_error());
list($url2) = mysql_fetch_array($amr);
 
 
 
$select1 = "SELECT `siteurl` FROM `config`";
$amr1 = mysql_query($select1);
if (!$amr1) die(mysql_error());
list($siteurl) = mysql_fetch_array($amr1);
 
 
 
?>
 
Result
 
 
<textarea  class="input" rows="14" name="multi" cols="59"><?php echo $siteurl; ?>/<? echo $url2 ?></textarea>

Open in new window

M-ezzatAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NerdsOfTechTechnology ScientistCommented:
I think can help you with this.

Are you saying that you would like to enter URLS in the TEXTAREA and then insert every URL in separate row?

Please clarify and describe what you want your form to do more clearly.

Thanks
0
M-ezzatAuthor Commented:
Yes

i want send more than url in textarea




and separate the Results and add each url in line to SQL
<textarea  class="input" rows="14" name="multi" cols="59">
SendUrl1
SendUrl2
SendUrl3
SendUrl4
SendUrl5
SendUrl6
SendUrl7
SendUrl8
SendUrl9
SendUrl10
</textarea>
 
<textarea  class="input" rows="14" name="multi" cols="59">
Result1
Result2
Result3
Result4
Result5
Result6
Result7
Result8
Result9
Result10
</textarea>

Open in new window

0
NerdsOfTechTechnology ScientistCommented:
How would you like the result URLs be derived?

Say I type in:

www.google.com
www.yahoo.com/somepage/
www.google.com/search/

What would the result URLs look for example?

Thanks
0
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

M-ezzatAuthor Commented:

look this script like TinyURL.com

but i want make multi links

You said

www.google.com
www.yahoo.com/somepage/
www.google.com/search/


I want the result

MySiteName.Com/tiny/ID1
MySiteName.Com/tiny/ID2
MySiteName.Com/tiny/ID3

that mean every site will insert to my db as line
0
M-ezzatAuthor Commented:
Anyone can help?
0
NerdsOfTechTechnology ScientistCommented:
I can. Are you saying that in this example:

Input:
www.google.com
www.yahoo.com/somepage/
www.google.com/search/


Output:

tblURL
ID    Real URL
==================================
1     www.google.com
2     www.yahoo.com/somepage/
3     www.google.com/search/

So that when someone goes to:

http://MySiteName.com/tiny/ID1

they are redirected to www.google.com?

Thanks
0
M-ezzatAuthor Commented:
when someone goes to:

http://MySiteName.com/tiny/ID1

Will redirected to My second page to tell him
wait 5 sc then the vistor will click to go to www.google.com?


example:

4share-forex.us/1
0
NerdsOfTechTechnology ScientistCommented:
You would have to have apache and rewrite ON and create a .htmaccesss file in the public directory...

You would then need a processing page such as tiny.php - which would access the database entry for matched ID (such as 1) from the query string (corresponds to www.google.com in the above example) and outputs the result as a link or a redirect.

Hope this helps.

=NerdsOfTech

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^tiny/ID([0-9]+)/$ /tiny.php?id=$1 [L]

Open in new window

0
NerdsOfTechTechnology ScientistCommented:
I mean .htmaccess
0
NerdsOfTechTechnology ScientistCommented:
I am available for hire if you need this job done for you as this is a multi-step process.

=NerdsOfTech
0
M-ezzatAuthor Commented:
i'm already done this step i talk about Multi insert

Like

http://lenkawy.com/index.php5?op=large

Or

http://www.any-services.com/demo/short/multi.php


in form write any url like that

http://www.google.com
http://www.google.co.uk
http://www.google.us
http://www.googles.com

And click Go Or Protect Links

Will see the result

that what i mean
0
NerdsOfTechTechnology ScientistCommented:
Okay. Post your database table you want the information to go into
0
M-ezzatAuthor Commented:
i'll post the the script

http://www.4share-forex.us/url.zip

all files + db

what i need in multi.php and MultiDone.php


NerdsOfTech Thanks for ur help
0
NerdsOfTechTechnology ScientistCommented:
backup and replace:
MultiDone

:
<?php
include_once("./includes/Global.php");
?>
 
<!DOCTYpE HTML pUBliC "-//W3C//Dtd hTML 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<TITLE><? echo _SITE_TITLE_;?></TITLE>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="<? echo _KEYWORKDS_;?>" name=keywords>
<meta content="<? echo _DESCRIPTION_;?>" name=description>
<link href="<? echo _SITE_URL_;?>/style/default.css" type=text/css rel=stylesheet>
 
<script type="text/javascript">
 
function highlight(field)
{
        field.focus();
        field.select();
}
</script>
</head>
 
<body>
<? echo $Notices1 ?>
 
<?php
 
include_once("./includes/Global.php");
//$array = array();
 
 
//// I reccomend you do some anti-sql-injection code here
$url =  $_POST['multiurls'];
 
 
 
if (!isset($url))
{
	print "please full all fields";
}
else
{
 $aurl = explode("\n", $url);
 $insert= new mysqlQueryClass();
 $insert = "INSERT INTO `data` (`id`, `url`) values ";
 foreach ($aurl as $value){
  $insert .= (NULL ,'$value')";
 }
 $mysqlQuery->mysqlQueryUpdate($insert);
 if (!$mysqlQuery) die(mysql_error());
}
 
$amr=new mysqlQueryClass();
$select = "SELECT MAX(id) FROM `data` WHERE `URL` IN ()";
foreach ($aurl as $value){
 $select .= "'$value',";
}
$select = rtrim($select, ","); // remove last comma in list
$select .= ");";
$amr->mysqlQuery($select);
list($url2)=$amr->result;
 
$amr1=new mysqlQueryClass();
$select1 = "SELECT `siteurl` FROM `config`";
$amr1->mysqlQuery($select1);
list($siteurl) =$amr1->result;
 
?>
 
<div id=outer>
<div id=inner>
<div id=header>
<h1><? echo $sitename ?></h1>
			<h2>Sharing is just getting better!</h2></div>
<div id=menu>
<ul>
  <li class=first><a href="<? echo _SITE_URL_;?>/">home</a>
  <li><a href="<? echo _SITE_URL_;?>/Upload/">Upload</a>
  <li><a href="<? echo _SITE_URL_;?>/">protect</a>
  <li><a href="<? echo _SITE_URL_;?>/Tos/">Tos</a>
  <li><a href="<? echo _SITE_URL_;?>/ContactUs/">Contact us</a>
  </ul>
  </div>
<div id=primarycontent><!-- primary content start -->
<div class=post>
<div class=header>
<H3>Get Short &amp; protected link for your big files links:</H3></div>
<div class=content>
<table width="100%" border=0>
  <tbody>
  <tr>
    <td align=middle>
	<div id="outer0">
		<div id="inner0">
			<div id="primarycontent0">
				<div class="post">
					<div class="content">
						<p align="center"><b><font color="#006600">Your File was 
						successfully added :</font></b></div>
				</div>
			</div>
		</div>
	</div>
	<p>link: 
	<input size="40" onclick="highlight(this);" name="link" value="<?php echo $siteurl; ?>/<? echo $url2 ?>">
      <br />
      <br />
      <a href="/index.php">protect another link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	<a href="<? echo $url2 ?>">Test your link</a>
      
      <br /></td>
    </tr></tbody></table></td></tr><tr><td colspan="3" 
height="12%" width="738"></td></tr><tr><td colspan="3" height="0%" width="738">
<p style="text-align: center" align=center>
 
</td> 
&nbsp;</p></div>
	</div></div>
<? echo $Footer; ?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Open in new window

0
NerdsOfTechTechnology ScientistCommented:
Oops wait don't use that. Be right back with correct code
0
NerdsOfTechTechnology ScientistCommented:
Fixed.

<?php
include_once("./includes/Global.php");
?>
 
<!DOCTYpE HTML pUBliC "-//W3C//Dtd hTML 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<TITLE><? echo _SITE_TITLE_;?></TITLE>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="<? echo _KEYWORKDS_;?>" name=keywords>
<meta content="<? echo _DESCRIPTION_;?>" name=description>
<link href="<? echo _SITE_URL_;?>/style/default.css" type=text/css rel=stylesheet>
 
<script type="text/javascript">
 
function highlight(field)
{
        field.focus();
        field.select();
}
</script>
</head>
 
<body>
<? echo $Notices1 ?>
 
<?php
 
include_once("./includes/Global.php");
//$array = array();
 
 
//// I reccomend you do some anti-sql-injection code here
$url =  $_POST['multiurls'];
 
 
 
if (!isset($url))
{
	print "please full all fields";
}
else
{
 $aurl = explode("\n", $url);
 $insert= new mysqlQueryClass();
 $insert = "INSERT INTO `data` (`id`, `url`) values ";
 foreach ($aurl as $value){
  $insert .= "(NULL ,'$value'),";
 }
 $insert = rtrim($insert, ",");
 $mysqlQuery->mysqlQueryUpdate($insert);
 if (!$mysqlQuery) die(mysql_error());
}
 
$amr=new mysqlQueryClass();
$select = "SELECT MAX(id) FROM `data` WHERE `URL` IN ()";
foreach ($aurl as $value){
 $select .= "'$value',";
}
$select = rtrim($select, ","); // remove last comma in list
$select .= ");";
$amr->mysqlQuery($select);
list($url2)=$amr->result;
 
$amr1=new mysqlQueryClass();
$select1 = "SELECT `siteurl` FROM `config`";
$amr1->mysqlQuery($select1);
list($siteurl) =$amr1->result;
 
?>
 
<div id=outer>
<div id=inner>
<div id=header>
<h1><? echo $sitename ?></h1>
			<h2>Sharing is just getting better!</h2></div>
<div id=menu>
<ul>
  <li class=first><a href="<? echo _SITE_URL_;?>/">home</a>
  <li><a href="<? echo _SITE_URL_;?>/Upload/">Upload</a>
  <li><a href="<? echo _SITE_URL_;?>/">protect</a>
  <li><a href="<? echo _SITE_URL_;?>/Tos/">Tos</a>
  <li><a href="<? echo _SITE_URL_;?>/ContactUs/">Contact us</a>
  </ul>
  </div>
<div id=primarycontent><!-- primary content start -->
<div class=post>
<div class=header>
<H3>Get Short &amp; protected link for your big files links:</H3></div>
<div class=content>
<table width="100%" border=0>
  <tbody>
  <tr>
    <td align=middle>
	<div id="outer0">
		<div id="inner0">
			<div id="primarycontent0">
				<div class="post">
					<div class="content">
						<p align="center"><b><font color="#006600">Your File was 
						successfully added :</font></b></div>
				</div>
			</div>
		</div>
	</div>
	<p>link: 
	<input size="40" onclick="highlight(this);" name="link" value="<?php echo $siteurl; ?>/<? echo $url2 ?>">
      <br />
      <br />
      <a href="/index.php">protect another link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	<a href="<? echo $url2 ?>">Test your link</a>
      
      <br /></td>
    </tr></tbody></table></td></tr><tr><td colspan="3" 
height="12%" width="738"></td></tr><tr><td colspan="3" height="0%" width="738">
<p style="text-align: center" align=center>
 
</td> 
&nbsp;</p></div>
	</div></div>
<? echo $Footer; ?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Open in new window

0
NerdsOfTechTechnology ScientistCommented:
That should fixed the insert and select functionality. However I think you should output the links in a similar way with foreach.

=NerdsOfTech
0
M-ezzatAuthor Commented:
Errors And Please Protection the Process

please full all fields

Warning: Invalid argument supplied for foreach() in G:\AppServ\www\url\MultiDone.php on line 57
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1

0
NerdsOfTechTechnology ScientistCommented:
Fix error in SELECT.

Test #2
<?php
include_once("./includes/Global.php");
?>
 
<!DOCTYpE HTML pUBliC "-//W3C//Dtd hTML 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<TITLE><? echo _SITE_TITLE_;?></TITLE>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="<? echo _KEYWORKDS_;?>" name=keywords>
<meta content="<? echo _DESCRIPTION_;?>" name=description>
<link href="<? echo _SITE_URL_;?>/style/default.css" type=text/css rel=stylesheet>
 
<script type="text/javascript">
 
function highlight(field)
{
        field.focus();
        field.select();
}
</script>
</head>
 
<body>
<? echo $Notices1 ?>
 
<?php
 
include_once("./includes/Global.php");
//$array = array();
 
 
//// I reccomend you do some anti-sql-injection code here
$url =  $_POST['multiurls'];
 
 
 
if (!isset($url))
{
	print "please full all fields";
}
else
{
 $aurl = explode("\n", $url);
 $insert= new mysqlQueryClass();
 $insert = "INSERT INTO `data` (`id`, `url`) values ";
 foreach ($aurl as $value){
  $insert .= "(NULL ,'$value'),";
 }
 $insert = rtrim($insert, ",");
 $mysqlQuery->mysqlQueryUpdate($insert);
 if (!$mysqlQuery) die(mysql_error());
}
 
$amr=new mysqlQueryClass();
$select = "SELECT MAX(id) FROM `data` WHERE `URL` IN (";
foreach ($aurl as $value){
 $select .= "'$value',";
}
$select = rtrim($select, ","); // remove last comma in list
$select .= ");";
$amr->mysqlQuery($select);
list($url2)=$amr->result;
 
$amr1=new mysqlQueryClass();
$select1 = "SELECT `siteurl` FROM `config`";
$amr1->mysqlQuery($select1);
list($siteurl) =$amr1->result;
 
?>
 
<div id=outer>
<div id=inner>
<div id=header>
<h1><? echo $sitename ?></h1>
			<h2>Sharing is just getting better!</h2></div>
<div id=menu>
<ul>
  <li class=first><a href="<? echo _SITE_URL_;?>/">home</a>
  <li><a href="<? echo _SITE_URL_;?>/Upload/">Upload</a>
  <li><a href="<? echo _SITE_URL_;?>/">protect</a>
  <li><a href="<? echo _SITE_URL_;?>/Tos/">Tos</a>
  <li><a href="<? echo _SITE_URL_;?>/ContactUs/">Contact us</a>
  </ul>
  </div>
<div id=primarycontent><!-- primary content start -->
<div class=post>
<div class=header>
<H3>Get Short &amp; protected link for your big files links:</H3></div>
<div class=content>
<table width="100%" border=0>
  <tbody>
  <tr>
    <td align=middle>
	<div id="outer0">
		<div id="inner0">
			<div id="primarycontent0">
				<div class="post">
					<div class="content">
						<p align="center"><b><font color="#006600">Your File was 
						successfully added :</font></b></div>
				</div>
			</div>
		</div>
	</div>
	<p>link: 
	<input size="40" onclick="highlight(this);" name="link" value="<?php echo $siteurl; ?>/<? echo $url2 ?>">
      <br />
      <br />
      <a href="/index.php">protect another link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	<a href="<? echo $url2 ?>">Test your link</a>
      
      <br /></td>
    </tr></tbody></table></td></tr><tr><td colspan="3" 
height="12%" width="738"></td></tr><tr><td colspan="3" height="0%" width="738">
<p style="text-align: center" align=center>
 
</td> 
&nbsp;</p></div>
	</div></div>
<? echo $Footer; ?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Open in new window

0
M-ezzatAuthor Commented:
Yes it's working now no errors

but the result get 1 query but i put many sites in text area

what about

Result
 
How get the protected link every line like

http://www.any-services.com/demo/short/multi.php
<textarea  class="input" rows="14" name="multi" cols="59"><?php echo $siteurl; ?>/<? echo $url2 ?></textarea>

Open in new window

0
NerdsOfTechTechnology ScientistCommented:
Nice.

As I mentioned before your output needs to be changed to output an "array" of URLS instead of just one.

I would use foreach to loop through the URLS.

Anyways, I added SQL-INJECTION protection to your input as you where wide open to attackers before.

=NerdsOfTech







<?php
include_once("./includes/Global.php");
?>
 
<!DOCTYpE HTML pUBliC "-//W3C//Dtd hTML 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<TITLE><? echo _SITE_TITLE_;?></TITLE>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="<? echo _KEYWORKDS_;?>" name=keywords>
<meta content="<? echo _DESCRIPTION_;?>" name=description>
<link href="<? echo _SITE_URL_;?>/style/default.css" type=text/css rel=stylesheet>
 
<script type="text/javascript">
 
function highlight(field)
{
        field.focus();
        field.select();
}
</script>
</head>
 
<body>
<? echo $Notices1 ?>
 
<?php
 
include_once("./includes/Global.php");
//$array = array();
 
 
//// I reccomend you do some anti-sql-injection code here = DONE
$url =  mysql_real_escape_string($_POST['multiurls']);
 
 
 
if (!isset($url))
{
	print "please full all fields";
}
else
{
 $aurl = explode("\n", $url);
 $insert= new mysqlQueryClass();
 $insert = "INSERT INTO `data` (`id`, `url`) values ";
 foreach ($aurl as $value){
  $insert .= "(NULL ,'$value'),";
 }
 $insert = rtrim($insert, ",");
 $mysqlQuery->mysqlQueryUpdate($insert);
 if (!$mysqlQuery) die(mysql_error());
}
 
$amr=new mysqlQueryClass();
$select = "SELECT MAX(id) FROM `data` WHERE `URL` IN (";
foreach ($aurl as $value){
 $select .= "'$value',";
}
$select = rtrim($select, ","); // remove last comma in list
$select .= ");";
$amr->mysqlQuery($select);
list($url2)=$amr->result;
 
$amr1=new mysqlQueryClass();
$select1 = "SELECT `siteurl` FROM `config`";
$amr1->mysqlQuery($select1);
list($siteurl) =$amr1->result;
 
?>
 
<div id=outer>
<div id=inner>
<div id=header>
<h1><? echo $sitename ?></h1>
			<h2>Sharing is just getting better!</h2></div>
<div id=menu>
<ul>
  <li class=first><a href="<? echo _SITE_URL_;?>/">home</a>
  <li><a href="<? echo _SITE_URL_;?>/Upload/">Upload</a>
  <li><a href="<? echo _SITE_URL_;?>/">protect</a>
  <li><a href="<? echo _SITE_URL_;?>/Tos/">Tos</a>
  <li><a href="<? echo _SITE_URL_;?>/ContactUs/">Contact us</a>
  </ul>
  </div>
<div id=primarycontent><!-- primary content start -->
<div class=post>
<div class=header>
<H3>Get Short &amp; protected link for your big files links:</H3></div>
<div class=content>
<table width="100%" border=0>
  <tbody>
  <tr>
    <td align=middle>
	<div id="outer0">
		<div id="inner0">
			<div id="primarycontent0">
				<div class="post">
					<div class="content">
						<p align="center"><b><font color="#006600">Your File was 
						successfully added :</font></b></div>
				</div>
			</div>
		</div>
	</div>
	<p>link: 
	<input size="40" onclick="highlight(this);" name="link" value="<?php echo $siteurl; ?>/<? echo $url2 ?>">
      <br />
      <br />
      <a href="/index.php">protect another link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	<a href="<? echo $url2 ?>">Test your link</a>
      
      <br /></td>
    </tr></tbody></table></td></tr><tr><td colspan="3" 
height="12%" width="738"></td></tr><tr><td colspan="3" height="0%" width="738">
<p style="text-align: center" align=center>
 
</td> 
&nbsp;</p></div>
	</div></div>
<? echo $Footer; ?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NerdsOfTechTechnology ScientistCommented:
Test #3
<?php
include_once("./includes/Global.php");
?>
 
<!DOCTYpE HTML pUBliC "-//W3C//Dtd hTML 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<TITLE><? echo _SITE_TITLE_;?></TITLE>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="<? echo _KEYWORKDS_;?>" name=keywords>
<meta content="<? echo _DESCRIPTION_;?>" name=description>
<link href="<? echo _SITE_URL_;?>/style/default.css" type=text/css rel=stylesheet>
 
<script type="text/javascript">
 
function highlight(field)
{
        field.focus();
        field.select();
}
</script>
</head>
 
<body>
<? echo $Notices1 ?>
 
<?php
 
include_once("./includes/Global.php");
//$array = array();
 
 
//// I reccomend you do some anti-sql-injection code here = DONE
$url =  mysql_real_escape_string($_POST['multiurls']);
 
 
 
if (!isset($url))
{
	print "please full all fields";
}
else
{
 $aurl = explode("\n", $url);
 $insert= new mysqlQueryClass();
 $insert = "INSERT INTO `data` (`id`, `url`) values ";
 foreach ($aurl as $value){
  $insert .= "(NULL ,'$value'),";
 }
 $insert = rtrim($insert, ",");
 $mysqlQuery->mysqlQueryUpdate($insert);
 if (!$mysqlQuery) die(mysql_error());
}
 
$amr=new mysqlQueryClass();
$select = "SELECT MAX(id) FROM `data` WHERE `URL` IN (";
foreach ($aurl as $value){
 $select .= "'$value',";
}
$select = rtrim($select, ","); // remove last comma in list
$select .= ");";
$amr->mysqlQuery($select);
$url2=$amr->result;
 
$amr1=new mysqlQueryClass();
$select1 = "SELECT `siteurl` FROM `config`";
$amr1->mysqlQuery($select1);
list($siteurl) =$amr1->result;
 
?>
 
<div id=outer>
<div id=inner>
<div id=header>
<h1><? echo $sitename ?></h1>
			<h2>Sharing is just getting better!</h2></div>
<div id=menu>
<ul>
  <li class=first><a href="<? echo _SITE_URL_;?>/">home</a>
  <li><a href="<? echo _SITE_URL_;?>/Upload/">Upload</a>
  <li><a href="<? echo _SITE_URL_;?>/">protect</a>
  <li><a href="<? echo _SITE_URL_;?>/Tos/">Tos</a>
  <li><a href="<? echo _SITE_URL_;?>/ContactUs/">Contact us</a>
  </ul>
  </div>
<div id=primarycontent><!-- primary content start -->
<div class=post>
<div class=header>
<H3>Get Short &amp; protected link for your big files links:</H3></div>
<div class=content>
<table width="100%" border=0>
  <tbody>
  <tr>
    <td align=middle>
	<div id="outer0">
		<div id="inner0">
			<div id="primarycontent0">
				<div class="post">
					<div class="content">
						<p align="center"><b><font color="#006600">Your File was 
						successfully added :</font></b></div>
				</div>
			</div>
		</div>
	</div>
	<p>link:
 
      <input size="40" onclick="highlight(this);" name="link" value="<?php echo $siteurl; ?>">
      <br />
      <br />
      <a href="/index.php">protect another link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 
<br/>
Test your link(s):
<br/>
<br/>
<?php
 foreach ($url2 as $value){
?> 
	<a href="<? echo $value ?>">$value</a>
<?php
 }
?>      
      <br /></td>
    </tr></tbody></table></td></tr><tr><td colspan="3" 
height="12%" width="738"></td></tr><tr><td colspan="3" height="0%" width="738">
<p style="text-align: center" align=center>
 
</td> 
&nbsp;</p></div>
	</div></div>
<? echo $Footer; ?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Open in new window

0
M-ezzatAuthor Commented:
Not working yet.

when send the values from multi.php
manysites like that

http://localhost/link.php
http://localhost/link2.php
http://localhost/link3.php

to multidone.php

as the same values

like that

<a href="61">$value</a>
 
<a href="61">$value</a>

0
M-ezzatAuthor Commented:
Not working cuz

when i'm add

http://localhost/url/multi.php
http://localhost/url/multi.php
http://localhost/url/multi.php
http://localhost/url/multi.php

the query add all like in 1 line in data table

not like what i want

i want every insert every site to db

id 1 http://localhost/url/multi.php
id 2 http://localhost/url/multi.php
id 3 http://localhost/url/multi.php
id 4 http://localhost/url/multi.php

and i tryed new func

<textarea rows="14" name="multiurls"  class="input"  cols="59">
<?php foreach ($url2 as $value)
{
?>
<? echo nl2br($value); ?><?php }?>
</textarea>
<?php
include_once("./includes/Global.php");
?>
 
<!DOCTYpE HTML pUBliC "-//W3C//Dtd hTML 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<TITLE><? echo _SITE_TITLE_;?></TITLE>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="<? echo _KEYWORKDS_;?>" name=keywords>
<meta content="<? echo _DESCRIPTION_;?>" name=description>
<link href="<? echo _SITE_URL_;?>/style/default.css" type=text/css rel=stylesheet>
 
<script type="text/javascript">
 
function highlight(field)
{
        field.focus();
        field.select();
}
</script>
</head>
 
<body>
<? echo $Notices1 ?>
 
<?php
 
include_once("./includes/Global.php");
//$array = array();
 
 
//// I reccomend you do some anti-sql-injection code here = DONE
$url =  mysql_real_escape_string($_POST['multiurls']);
 
 
 
if (!isset($url))
{
	print "please full all fields";
}
else
{
 $aurl = explode("\n", $url);
 $insert= new mysqlQueryClass();
 $insert = "INSERT INTO `data` (`id`, `url`) values ";
 foreach ($aurl as $value){
  $insert .= "(NULL ,'$value'),";
 }
 $insert = rtrim($insert, ",");
 $mysqlQuery->mysqlQueryUpdate($insert);
 if (!$mysqlQuery) die(mysql_error());
}
 
$amr=new mysqlQueryClass();
$select = "SELECT id FROM `data` WHERE `url` IN (";
foreach ($aurl as $value){
 $select .= "'$value',";
}
$select = rtrim($select, ","); // remove last comma in list
$select .= ");";
$amr->mysqlQuery($select);
$url2=$amr->result;
 
$amr1=new mysqlQueryClass();
$select1 = "SELECT `siteurl` FROM `config`";
$amr1->mysqlQuery($select1);
list($siteurl) =$amr1->result;
 
?>
 
<div id=outer>
<div id=inner>
<div id=header>
<h1><? echo $sitename ?></h1>
			<h2>Sharing is just getting better!</h2></div>
<div id=menu>
<ul>
  <li class=first><a href="<? echo _SITE_URL_;?>/">home</a>
  <li><a href="<? echo _SITE_URL_;?>/Upload/">Upload</a>
  <li><a href="<? echo _SITE_URL_;?>/">protect</a>
  <li><a href="<? echo _SITE_URL_;?>/Tos/">Tos</a>
  <li><a href="<? echo _SITE_URL_;?>/ContactUs/">Contact us</a>
  </ul>
  </div>
<div id=primarycontent><!-- primary content start -->
<div class=post>
<div class=header>
<H3>Get Short &amp; protected link for your big files links:</H3></div>
<div class=content>
<table width="100%" border=0>
  <tbody>
  <tr>
    <td align=middle>
	<div id="outer0">
		<div id="inner0">
			<div id="primarycontent0">
				<div class="post">
					<div class="content">
						<p align="center"><b><font color="#006600">Your File was 
						successfully added :</font></b></div>
				</div>
			</div>
		</div>
	</div>
	<p>link:
		
      <input size="40" onclick="highlight(this);" name="link" value="">
      <br />
      <br />
      <a href="/index.php">protect another link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
 
<br/>
Test your link(s):
<br/>
<br/>
<textarea rows="14" name="multiurls"  class="input"  cols="59">
<?php foreach ($url2 as $value)
{
?> 
<? echo nl2br($value); ?><?php }?>
</textarea>     
      <br /></td>
    </tr></tbody></table></td></tr><tr><td colspan="3" 
height="12%" width="738"></td></tr><tr><td colspan="3" height="0%" width="738">
<p style="text-align: center" align=center>
 
</td> 
&nbsp;</p></div>
	</div></div>
<? echo $Footer; ?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Open in new window

0
NerdsOfTechTechnology ScientistCommented:
what were the results from your alteration?
0
M-ezzatAuthor Commented:
Now url multidone.php add every site in line to db but

the result

Not correct

Go to this page

http://www.4share-forex.us/url/multi.php

and copy all sites and past it in the form

http://localhost/url/multi.php
http://localhost/url/multi.php
http://localhost/url/multi.php
http://localhost/url/multi.php



you will understand what i say

and i want send you private data to my site to see everything

0
M-ezzatAuthor Commented:
I think the problem here

$amr=new mysqlQueryClass();
$select = "SELECT MAX(id) FROM `data` WHERE `URL` IN (";
foreach ($aurl as $value){
 $select .= "'$value',";


becuase this query get Max id in data only

not all values
0
NerdsOfTechTechnology ScientistCommented:
Thanks!
$amr=new mysqlQueryClass();
$select = "SELECT id FROM `data` WHERE `URL` IN (";
foreach ($aurl as $value){
 $select .= "'$value',";

Open in new window

0
NerdsOfTechTechnology ScientistCommented:
Never mind, I didn't see MAX anywhere?

I fixed the problem I think on the one we were working on:
<?php
include_once("./includes/Global.php");
?>
 
<!DOCTYpE HTML pUBliC "-//W3C//Dtd hTML 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<TITLE><? echo _SITE_TITLE_;?></TITLE>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="<? echo _KEYWORKDS_;?>" name=keywords>
<meta content="<? echo _DESCRIPTION_;?>" name=description>
<link href="<? echo _SITE_URL_;?>/style/default.css" type=text/css rel=stylesheet>
 
<script type="text/javascript">
 
function highlight(field)
{
        field.focus();
        field.select();
}
</script>
</head>
 
<body>
<? echo $Notices1 ?>
 
<?php
 
include_once("./includes/Global.php");
//$array = array();
 
 
//// I reccomend you do some anti-sql-injection code here = DONE
$url =  mysql_real_escape_string($_POST['multiurls']);
 
 
 
if (!isset($url))
{
	print "please full all fields";
}
else
{
 $aurl = explode("\n", $url);
 $insert= new mysqlQueryClass();
 $insert = "INSERT INTO `data` (`id`, `url`) values ";
 foreach ($aurl as $value){
  $insert .= "(NULL ,'$value'),";
 }
 $insert = rtrim($insert, ",");
 $mysqlQuery->mysqlQueryUpdate($insert);
 if (!$mysqlQuery) die(mysql_error());
}
 
$amr=new mysqlQueryClass();
$select = "SELECT id FROM `data` WHERE `url` IN (";
foreach ($aurl as $value){
 $select .= "'$value',";
}
$select = rtrim($select, ","); // remove last comma in list
$select .= ");";
$amr->mysqlQuery($select);
$url2=$amr->result;
 
$amr1=new mysqlQueryClass();
$select1 = "SELECT `siteurl` FROM `config`";
$amr1->mysqlQuery($select1);
$siteurl =$amr1->result;
 
?>
 
<div id=outer>
<div id=inner>
<div id=header>
<h1><? echo $sitename ?></h1>
			<h2>Sharing is just getting better!</h2></div>
<div id=menu>
<ul>
  <li class=first><a href="<? echo _SITE_URL_;?>/">home</a>
  <li><a href="<? echo _SITE_URL_;?>/Upload/">Upload</a>
  <li><a href="<? echo _SITE_URL_;?>/">protect</a>
  <li><a href="<? echo _SITE_URL_;?>/Tos/">Tos</a>
  <li><a href="<? echo _SITE_URL_;?>/ContactUs/">Contact us</a>
  </ul>
  </div>
<div id=primarycontent><!-- primary content start -->
<div class=post>
<div class=header>
<H3>Get Short &amp; protected link for your big files links:</H3></div>
<div class=content>
<table width="100%" border=0>
  <tbody>
  <tr>
    <td align=middle>
	<div id="outer0">
		<div id="inner0">
			<div id="primarycontent0">
				<div class="post">
					<div class="content">
						<p align="center"><b><font color="#006600">Your File was 
						successfully added :</font></b></div>
				</div>
			</div>
		</div>
	</div>
	<p>link:
 
<?php 
 foreach ($url2 as $value)
 {
?>	
 <input size="40" onclick="highlight(this);" name="link" value="$value"> 
 <a href="value">Test Link</a>
 <br />
<?php
 }
?>
 
<a href="/index.php">protect another link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<br /> 
</td>
</tr></tbody></table></td></tr>
<tr><td colspan="3" height="12%" width="738"></td></tr><tr><td colspan="3" height="0%" width="738">
<p style="text-align: center" align=center>
</td> 
&nbsp;</p></div>
</div></div>
<? echo $Footer; ?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Open in new window

0
NerdsOfTechTechnology ScientistCommented:
typo

use this instead:
<?php
include_once("./includes/Global.php");
?>
 
<!DOCTYpE HTML pUBliC "-//W3C//Dtd hTML 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<TITLE><? echo _SITE_TITLE_;?></TITLE>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="<? echo _KEYWORKDS_;?>" name=keywords>
<meta content="<? echo _DESCRIPTION_;?>" name=description>
<link href="<? echo _SITE_URL_;?>/style/default.css" type=text/css rel=stylesheet>
 
<script type="text/javascript">
 
function highlight(field)
{
        field.focus();
        field.select();
}
</script>
</head>
 
<body>
<? echo $Notices1 ?>
 
<?php
 
include_once("./includes/Global.php");
//$array = array();
 
 
//// I reccomend you do some anti-sql-injection code here = DONE
$url =  mysql_real_escape_string($_POST['multiurls']);
 
 
 
if (!isset($url))
{
	print "please full all fields";
}
else
{
 $aurl = explode("\n", $url);
 $insert= new mysqlQueryClass();
 $insert = "INSERT INTO `data` (`id`, `url`) values ";
 foreach ($aurl as $value){
  $insert .= "(NULL ,'$value'),";
 }
 $insert = rtrim($insert, ",");
 $mysqlQuery->mysqlQueryUpdate($insert);
 if (!$mysqlQuery) die(mysql_error());
}
 
$amr=new mysqlQueryClass();
$select = "SELECT id FROM `data` WHERE `url` IN (";
foreach ($aurl as $value){
 $select .= "'$value',";
}
$select = rtrim($select, ","); // remove last comma in list
$select .= ");";
$amr->mysqlQuery($select);
$url2=$amr->result;
 
$amr1=new mysqlQueryClass();
$select1 = "SELECT `siteurl` FROM `config`";
$amr1->mysqlQuery($select1);
$siteurl =$amr1->result;
 
?>
 
<div id=outer>
<div id=inner>
<div id=header>
<h1><? echo $sitename ?></h1>
			<h2>Sharing is just getting better!</h2></div>
<div id=menu>
<ul>
  <li class=first><a href="<? echo _SITE_URL_;?>/">home</a>
  <li><a href="<? echo _SITE_URL_;?>/Upload/">Upload</a>
  <li><a href="<? echo _SITE_URL_;?>/">protect</a>
  <li><a href="<? echo _SITE_URL_;?>/Tos/">Tos</a>
  <li><a href="<? echo _SITE_URL_;?>/ContactUs/">Contact us</a>
  </ul>
  </div>
<div id=primarycontent><!-- primary content start -->
<div class=post>
<div class=header>
<H3>Get Short &amp; protected link for your big files links:</H3></div>
<div class=content>
<table width="100%" border=0>
  <tbody>
  <tr>
    <td align=middle>
	<div id="outer0">
		<div id="inner0">
			<div id="primarycontent0">
				<div class="post">
					<div class="content">
						<p align="center"><b><font color="#006600">Your File was 
						successfully added :</font></b></div>
				</div>
			</div>
		</div>
	</div>
	<p>link:
 
<?php 
 foreach ($url2 as $value)
 {
?>	
 <input size="40" onclick="highlight(this);" name="link" value="<?php echo $value ?>"> 
 <a href="<?php echo $value ?>">Test Link</a>
 <br />
<?php
 }
?>
 
<a href="/index.php">protect another link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<br /> 
</td>
</tr></tbody></table></td></tr>
<tr><td colspan="3" height="12%" width="738"></td></tr><tr><td colspan="3" height="0%" width="738">
<p style="text-align: center" align=center>
</td> 
&nbsp;</p></div>
</div></div>
<? echo $Footer; ?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Open in new window

0
NerdsOfTechTechnology ScientistCommented:
Typo #2 fixed use this instead:
<?php
include_once("./includes/Global.php");
?>
 
<!DOCTYpE HTML pUBliC "-//W3C//Dtd hTML 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<TITLE><? echo _SITE_TITLE_;?></TITLE>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="<? echo _KEYWORKDS_;?>" name=keywords>
<meta content="<? echo _DESCRIPTION_;?>" name=description>
<link href="<? echo _SITE_URL_;?>/style/default.css" type=text/css rel=stylesheet>
 
<script type="text/javascript">
 
function highlight(field)
{
        field.focus();
        field.select();
}
</script>
</head>
 
<body>
<? echo $Notices1; ?>
 
<?php
 
include_once("./includes/Global.php");
//$array = array();
 
 
//// I reccomend you do some anti-sql-injection code here = DONE
$url =  mysql_real_escape_string($_POST['multiurls']);
 
 
 
if (!isset($url))
{
	print "please full all fields";
}
else
{
 $aurl = explode("\n", $url);
 $insert= new mysqlQueryClass();
 $insert = "INSERT INTO `data` (`id`, `url`) values ";
 foreach ($aurl as $value){
  $insert .= "(NULL ,'$value'),";
 }
 $insert = rtrim($insert, ",");
 $mysqlQuery->mysqlQueryUpdate($insert);
 if (!$mysqlQuery) die(mysql_error());
}
 
$amr=new mysqlQueryClass();
$select = "SELECT id FROM `data` WHERE `url` IN (";
foreach ($aurl as $value){
 $select .= "'$value',";
}
$select = rtrim($select, ","); // remove last comma in list
$select .= ");";
$amr->mysqlQuery($select);
$url2=$amr->result;
 
$amr1=new mysqlQueryClass();
$select1 = "SELECT `siteurl` FROM `config`";
$amr1->mysqlQuery($select1);
$siteurl =$amr1->result;
 
?>
 
<div id=outer>
<div id=inner>
<div id=header>
<h1><? echo $sitename; ?></h1>
			<h2>Sharing is just getting better!</h2></div>
<div id=menu>
<ul>
  <li class=first><a href="<? echo _SITE_URL_;?>/">home</a>
  <li><a href="<? echo _SITE_URL_;?>/Upload/">Upload</a>
  <li><a href="<? echo _SITE_URL_;?>/">protect</a>
  <li><a href="<? echo _SITE_URL_;?>/Tos/">Tos</a>
  <li><a href="<? echo _SITE_URL_;?>/ContactUs/">Contact us</a>
  </ul>
  </div>
<div id=primarycontent><!-- primary content start -->
<div class=post>
<div class=header>
<H3>Get Short &amp; protected link for your big files links:</H3></div>
<div class=content>
<table width="100%" border=0>
  <tbody>
  <tr>
    <td align=middle>
	<div id="outer0">
		<div id="inner0">
			<div id="primarycontent0">
				<div class="post">
					<div class="content">
						<p align="center"><b><font color="#006600">Your File was 
						successfully added :</font></b></div>
				</div>
			</div>
		</div>
	</div>
	<p>link:
 
<?php 
 foreach ($url2 as $value)
 {
?>	
 <input size="40" onclick="highlight(this);" name="link" value="<?php echo $value; ?>"> 
 <a href="<?php echo $value; ?>">Test Link</a>
 <br />
<?php
 }
?>
 
<a href="/index.php">protect another link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<br /> 
</td>
</tr></tbody></table></td></tr>
<tr><td colspan="3" height="12%" width="738"></td></tr><tr><td colspan="3" height="0%" width="738">
<p style="text-align: center" align=center>
</td> 
&nbsp;</p></div>
</div></div>
<? echo $Footer; ?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Open in new window

0
M-ezzatAuthor Commented:
same problem

http://4share-forex.us/url/multi.php

the script given me same id in result

check the site
0
NerdsOfTechTechnology ScientistCommented:
Test, upload, and link
<?php
include_once("./includes/Global.php");
?>
 
<!DOCTYpE HTML pUBliC "-//W3C//Dtd hTML 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<TITLE><? echo _SITE_TITLE_;?></TITLE>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<meta content="<? echo _KEYWORKDS_;?>" name=keywords>
<meta content="<? echo _DESCRIPTION_;?>" name=description>
<link href="<? echo _SITE_URL_;?>/style/default.css" type=text/css rel=stylesheet>
 
<script type="text/javascript">
 
function highlight(field)
{
        field.focus();
        field.select();
}
</script>
</head>
 
<body>
<? echo $Notices1; ?>
 
<?php
 
include_once("./includes/Global.php");
//$array = array();
 
 
//// I reccomend you do some anti-sql-injection code here = DONE
$url =  mysql_real_escape_string($_POST['multiurls']);
 
 
 
if (!isset($url))
{
	print "please full all fields";
}
else
{
 $aurl = explode("\n", $url);
 $insert= new mysqlQueryClass();
 $insert = "INSERT INTO `data` (`id`, `url`) values ";
 foreach ($aurl as $value){
  $insert .= "(NULL ,'$value'),";
 }
 $insert = rtrim($insert, ",");
 $mysqlQuery->mysqlQueryUpdate($insert);
 if (!$mysqlQuery) die(mysql_error());
}
 
$amr=new mysqlQueryClass();
$select = "SELECT `id` FROM `data` WHERE `url` IN (";
foreach ($aurl as $value){
 $select .= "'$value',";
}
$select = rtrim($select, ","); // remove last comma in list
$select .= ");";
 
////DEBUG select
echo $select; 
 
$amr->mysqlQuery($select);
$url2=$amr->result;
 
$amr1=new mysqlQueryClass();
$select1 = "SELECT `siteurl` FROM `config`";
$amr1->mysqlQuery($select1);
list($siteurl)=$amr1->result;
 
?>
 
<div id=outer>
<div id=inner>
<div id=header>
<h1><? echo $sitename; ?></h1>
			<h2>Sharing is just getting better!</h2></div>
<div id=menu>
<ul>
  <li class=first><a href="<? echo _SITE_URL_;?>/">home</a>
  <li><a href="<? echo _SITE_URL_;?>/Upload/">Upload</a>
  <li><a href="<? echo _SITE_URL_;?>/">protect</a>
  <li><a href="<? echo _SITE_URL_;?>/Tos/">Tos</a>
  <li><a href="<? echo _SITE_URL_;?>/ContactUs/">Contact us</a>
  </ul>
  </div>
<div id=primarycontent><!-- primary content start -->
<div class=post>
<div class=header>
<H3>Get Short &amp; protected link for your big files links:</H3></div>
<div class=content>
<table width="100%" border=0>
  <tbody>
  <tr>
    <td align=middle>
	<div id="outer0">
		<div id="inner0">
			<div id="primarycontent0">
				<div class="post">
					<div class="content">
						<p align="center"><b><font color="#006600">Your File was 
						successfully added :</font></b></div>
				</div>
			</div>
		</div>
	</div>
	<p>link:
 
<?php 
 foreach ($url2 as $value)
 {
?>	
 <input size="40" onclick="highlight(this);" name="link" value="<?php echo $siteurl . '\' . $value; ?>"> 
 <a href="<?php echo $siteurl . '\' . $value; ?>">Test Link</a>
 <br />
<?php
 }
?>
 
<a href="/index.php">protect another link</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<br /> 
</td>
</tr></tbody></table></td></tr>
<tr><td colspan="3" height="12%" width="738"></td></tr><tr><td colspan="3" height="0%" width="738">
<p style="text-align: center" align=center>
</td> 
&nbsp;</p></div>
</div></div>
<? echo $Footer; ?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

Open in new window

0
NerdsOfTechTechnology ScientistCommented:
Also, output the debug for the select query I put in the code... thanks.
0
M-ezzatAuthor Commented:
Error when use mysql_real_escape_string

when remove all errors is gone


but the same error

http://www.4share-forex.us/url/24
http://www.4share-forex.us/url/24
0
NerdsOfTechTechnology ScientistCommented:
use code in #24792435

upload and post message.

I want to see the select SQL be printed out
0
M-ezzatAuthor Commented:
oki

Go to

http://4share-forex.us/url/multi.php

And wirte many sites and you will see the result
0
NerdsOfTechTechnology ScientistCommented:
yeah the select SQL looks perfect. However I think you need to add some sort of tranasction reference to the table so the select doesn't pickup other's URL entries that are similar.
0
NerdsOfTechTechnology ScientistCommented:
However, there are some problems in your processing gateway page you need to fix.

=NerdsOfTech
0
NerdsOfTechTechnology ScientistCommented:
Please post the structure of your tables here.

Thanks!
0
M-ezzatAuthor Commented:
DROP TABLE IF EXISTS `admins`;
CREATE TABLE IF NOT EXISTS `admins` (
  `Admin_ID` int(11) NOT NULL auto_increment,
  `Admin_UserName` varchar(255) NOT NULL default '',
  `Admin_Password` varchar(255) NOT NULL default '',
  `Admin_Level` int(11) NOT NULL default '0',
  `Admin_LastVisit` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`Admin_ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

DROP TABLE IF EXISTS `config`;
CREATE TABLE IF NOT EXISTS `config` (
  `id` int(2) NOT NULL auto_increment,
  `sitename` varchar(225) NOT NULL default '',
  `siteurl` varchar(225) NOT NULL default '',
  `adminemail` varchar(50) NOT NULL default '',
  `keywords` text NOT NULL,
  `description` text NOT NULL,
  `notes` text NOT NULL,
  `visits` int(20) NOT NULL default '0',
  `google1` text NOT NULL,
  `google2` text NOT NULL,
  `count` int(255) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

DROP TABLE IF EXISTS `data`;
CREATE TABLE IF NOT EXISTS `data` (
  `id` int(255) NOT NULL auto_increment,
  `title` varchar(255) collate latin1_general_ci NOT NULL default '',
  `url` text collate latin1_general_ci NOT NULL,
  `size` int(255) NOT NULL default '0',
  `email` varchar(255) collate latin1_general_ci NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=35 ;
0
NerdsOfTechTechnology ScientistCommented:
Can you give a few examples of data rows from config and data

Thanks!
0
M-ezzatAuthor Commented:
You can download the script and see what you want


or i can give my Cpanel to see everything :)
0
M-ezzatAuthor Commented:
0
NerdsOfTechTechnology ScientistCommented:
Thanks.

Now after the website gets the input and inserts into db

lets say for example:

CREATE TABLE `config` (
  `id` int(2) NOT NULL auto_increment,
  `sitename` varchar(225) NOT NULL default '',
  `siteurl` varchar(225) NOT NULL default '',
  `adminemail` varchar(50) NOT NULL,
  `keywords` text NOT NULL,
  `description` text NOT NULL,
  `notes` text NOT NULL,
  `visits` int(20) NOT NULL default '0',
  `google1` text NOT NULL,
  `google2` text NOT NULL,
  `count` int(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;




1, "Google", "www.google.com", "admin@google.com", etc.

Is there a particular URL you will give this entry?
Like:
http://www.4share-forex.us/url/1

?

thanks for the upload.
0
M-ezzatAuthor Commented:
CREATE TABLE IF NOT EXISTS `data` (
  `id` int(255) NOT NULL auto_increment,
  `title` varchar(255) collate latin1_general_ci NOT NULL default '',
  `url` text collate latin1_general_ci NOT NULL,
  `size` int(255) NOT NULL default '0',
  `email` varchar(255) collate latin1_general_ci NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=2 ;


(1, 'MyProblem', 'http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_24541635.html', 99, 'll3okl_elgnll@yahoo.com')

this page will get the url from database and give it to me.

http://www.4share-forex.us/url/1
0
NerdsOfTechTechnology ScientistCommented:
Sorry request the mod to post an alert on this Q I wont be able to help further. Good luck.
0
M-ezzatAuthor Commented:
Any way you will award the points

Thanks for ur help i'll try to end what ur started it
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.