★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/002371.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  PHP
  what is wrong in it

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   what is wrong in it
sundar
Member
posted August 11, 2000 03:22 AM     Click Here to See the Profile for sundar   Click Here to Email sundar     Edit/Delete Message Reply w/Quote
hi, thanks to all,
help me please.


what is wrong in my redirection of url.
if record is inserted then i want to send another page. esle also same thing.


<?php
mysql_connect('localhost', 'saf', 'afdsdfs');
mysql_select_db("chennaichalo");
$result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')");
?>

<?php
if(mysql_affected_rows($result)!=0)
{
header("Location:movieinfo.php3");
exit;
}esleif(mysql_affected_rows($result)==0)
{
header("location:movieinfo.php3");
exit;
}
?>

Shiju Rajan
Member
posted August 11, 2000 03:57 AM     Click Here to See the Profile for Shiju Rajan   Click Here to Email Shiju Rajan     Edit/Delete Message Reply w/Quote

<?php
mysql_connect('localhost', 'saf', 'afdsdfs');
mysql_select_db("chennaichalo");
$result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')");
?>

<?php
if(mysql_affected_rows($result)!=0)
{
header("Location:movieinfo.php3");
exit;
}esleif(mysql_affected_rows($result)==0)
{
header("location:movieinfo.php3");
exit;
}
?>
>>

Sundar,

White space should not be their before your header function.

<<
esleif(mysql_affected_rows($result)==0)
>>

Also this line is wrong.

try the following..

<?php
$con=mysql_connect('localhost', 'saf', 'afdsdfs');
mysql_select_db("chennaichalo",$con);
$result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')",$con);
if(mysql_affected_rows($result)>0)
{
header("Location: movieinfo.php3");
exit;
}else{
header("Location: movieinfo.php3");
exit;
}
?>


Good Luck!!

------------------
SR -
webshiju.com

"The fear of the LORD is the beginning of knowledge..."

[This message has been edited by Shiju Rajan (edited August 11, 2000).]

walshs
Member
posted August 11, 2000 04:03 AM     Click Here to See the Profile for walshs     Edit/Delete Message Reply w/Quote
i think shiju is right but if you still have problems try using the full http://xyz.com/moveinfo.php3 address to test if it works or even try sending it to some other website

waseem

into sport?? goto
http://www.sportwebapges.com

------------------
visit the next big thing in Information Technology http://www.itstop.com
pre-register now

sundar
Member
posted August 11, 2000 04:24 AM     Click Here to See the Profile for sundar   Click Here to Email sundar     Edit/Delete Message Reply w/Quote
Shiju Rajan sir,


<?php
mysql_connect('sgdfgsgs', 'dgdsd', 'dgdgd');
mysql_select_db("chennaichalo");
$result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')");
if(mysql_affected_rows($result)>0)
{
header("Location: www.chennaichalo.com/movieinfo.php3");
exit;
}else{
header("Location: www.chennaichalo.com/movieinfo.php3");
exit;
}
?>


its not working . is there any prob.....
please try to solve it.

[This message has been edited by sundar (edited August 11, 2000).]

Shiju Rajan
Member
posted August 11, 2000 04:51 AM     Click Here to See the Profile for Shiju Rajan   Click Here to Email Shiju Rajan     Edit/Delete Message Reply w/Quote

<<
<?php
mysql_connect('anvil', 'chennaic', 'card34bit');
mysql_select_db("chennaichalo");
$result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')");
if(mysql_affected_rows($result)>0)
{
header("Location: www.chennaichalo.com/movieinfo.php3");
exit;
}else{
header("Location: www.chennaichalo.com/movieinfo.php3");
exit;
}
?>
>>

Sundar,

cut and paste the following script in a notpad.make sure that no space before your "<?"(ie,php deliminator).

try this.
<?php
$con=mysql_connect('anvil', 'chennaic', 'card34bit');
mysql_select_db("chennaichalo",$con);
$result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')",$con);
if(mysql_affected_rows($result)>0){
header("Location: http://www.chennaichalo.com/movieinfo.php3");
}else{
header("Location: http://www.chennaichalo.com/movieinfo.php3");
exit;
}
?>

---------****----
Where are you working in chennai?.
--
Don't post the code with your actual server details in your connection string!!!(That may not be safe everytime).
--
you know,i was their in chennai 3 years.

write me at : shiju@post.com if you have some free time..

Actually i'm looking for a php programmer very urgently.Please tell me if you can help me in some way..

Good Luck!!!

------------------
SR -
webshiju.com

"The fear of the LORD is the beginning of knowledge..."

[This message has been edited by Shiju Rajan (edited August 11, 2000).]

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.