Follow us on Twitter!
One mans freedom fighter, another's terrorist.
Thursday, April 24, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 16
Guests Online: 15
Members Online: 1

Registered Members: 82890
Newest Member: ByteofPython
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

after sql echo


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-05-07 19:33
Hey ... This is probably really basic ... But i dont know how to do it ...
After someone presses submit on my form the INSERT php/sql code is exicuted plainly like this :

$sql = 'INSERT INTO `dotticms`.`navigation` (`name`, `link`, `target`, `status`) VALUES (\'new\', \'new\', NULL, \'1\'Wink;

I want a peice of code to be exicuted after the person has pressed submit and sql INSERT'ing has completed ....


Author

RE: after sql echo


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-05-07 19:52
Code

$sql = "your sql query";
mysql_query($sql) or die("SQL query failed, please try again"); //Will kill the script if it goes wrong

//Since we have got this far in the script, nothing has gone wrong
echo "whatever";
blah();
blah();
blah();








Edited by on 27-05-07 19:52
Author

RE: after sql echo


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-05-07 20:52
mastergamer wrote:
Code

$sql = "your sql query";
mysql_query($sql) or die("SQL query failed, please try again"); //Will kill the script if it goes wrong

//Since we have got this far in the script, nothing has gone wrong
echo "whatever";
blah();
blah();
blah();




ahhhh yea ... forgot about killing the script


Author

RE: after sql echo

spyware
Member



Posts: 4192
Location:
Joined: 14.04.07
Rank:
God
Warn Level: 90
Posted on 27-05-07 20:57
djdotti wrote:
ahhhh yea ... forgot about killing the script


It's not needed to run a SQL command, it comes in handy though, shows you where the error lies.



img507.imageshack.us/img507/3580/spynewsig3il1.png
"The chowner of property." - Zeph
[small]
Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term.
- Carl Sagan
[center]�Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor?� - Ebert[/ce
Author

RE: after sql echo


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-05-07 20:59
yes thankyou all
Dotti.