Jump to content

redarrow

Members
  • Posts

    7,306
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://freesingles.ath.cx

Profile Information

  • Gender
    Male
  • Location
    london

redarrow's Achievements

Advanced Member

Advanced Member (4/5)

1

Reputation

  1. my code not working it like the $sql->bindParam all fail please help $user_paypal_email=$_POST['user_paypal_email']; $user_skype_name=$_POST['user_skype_name']; $user_package_type=$_POST['user_package_type']; if( ($user_date_added) && ($user_id) && ($user_paypal_email) && ($user_skype_name) && ($user_package_type) ){ $conn = new PDO("mysql:host=$dbhost; dbname=$dbname", $dbusername, $dbpassword); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = ("INSERT INTO user_add (`user_id`, `user_paypal_email` , `user_skype_name` , `user_package_type` , `user_date_added` ) VALUES (:user_id, :user_paypal_email, :user_skype_name, :user_package_type, :user_date_added )"); $sql->bindParam(':user_id', $user_id, PDO::PARAM_STR); $sql->bindParam(':user_paypal_email', $user_paypal_email, PDO::PARAM_STR); $sql->bindParam(':user_skype_name', $user_skype_name, PDO::PARAM_STR); $sql->bindParam(':user_package_type', $user_package_type, PDO::PARAM_STR); $sql->bindParam(':user_date_added', $user_date_added, PDO::PARAM_STR); $sql->exec($sql);
  2. Thank you i am learning thank you for teaching me , i will print it all out and try and understand it all ... Thanks for your help . Regards john ..
  3. Is the order correct cid should be uid
  4. I agree with you but as a one night shit was not bad at all , yes it was a way for me to learn but like i say since i have found a good tutorial i change the code as i go , off course i am not going to use the code online in real life . Can you point out the way your think that a hacker can do wrong ..... Buy the way it was a pdo first go i am just learning pdo , php i am ok on. Dont no how you see only 88 times with my shuffle code .... Ps. If you look at the code you got to have the session set as admin before you can even use the page , so i dont no how anyone can set a session as admin if there not going thru the database and getting the session set , if the session not set then the session can not be set in the url ,,,, unless your saying there a way to set a session in a url but how???
  5. If your comming from the old mysql or the old mysqli i suggest a really good tutorail I was having really bad problams understanding All night , the totrial given to me above was to hard to understand , I come across a really good example Know i want throw my computer in the road . http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers#Fetch_Modes The above link is really easy to undestand as it exsplaines from mysql to pdo and it differences Which really helps . Please read it you wont regreat it. http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers#Fetch_Modes My code i posted as solved is not solved in a perfect way , as pdo has a way to stop hackers getting in or changeing info using a ? Place holder so as i learn i will rebuild my code properly and not cry like a child....
  6. <?php session_start(); error_reporting(0); @ini_set('display_errors', 0); if(!$_SESSION['username']=="admin"){ header("location: member_login.php"); exit; } $dbhost = "localhost"; $dbname = " "; $dbusername = "root"; $dbpassword = ""; if(isset($_POST['submit'])){ $user_date_added=date('m.d.y'); function randomGen($min, $max, $quantity) { $numbers = range($min, $max); shuffle($numbers); return array_slice($numbers, 0, $quantity); } $num=(randomGen(0,6,6)); $user_id=implode($num); $user_paypal_email=$_POST['user_paypal_email']; $user_skype_name=$_POST['user_skype_name']; $user_package_type=$_POST['user_package_type']; if( ($user_date_added) && ($user_id) && ($user_paypal_email) && ($user_skype_name) && ($user_package_type) ){ $conn = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbusername, $dbpassword); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "INSERT INTO user_add (`user_id`, `user_paypal_email` , `user_skype_name` , `user_package_type` , `user_date_added` ) VALUES('$user_id', '$user_paypal_email' , '$user_skype_name' , '$user_package_type' , '$user_date_added' )"; // use exec() because no results are returned $conn->exec($sql); echo "Please add another <a href='admin_add_user.php'>HERE</a>"; exit; $conn = null; }else{ echo "Please try agin <a href='admin_add_user.php'>HERE</a>"; exit; } } ?> SOLVED solved it my self........
  7. That dont help me at all, i am like a spastic i am trying to post from a form, if i can not add variables ,i might as well throw my pc throw the wall, and burn it in the middle of the road ,then go and find who made pdo and just kill them with a hammer............
  8. i don't understand please give me a full example cheers. the top example is fully pdo? are you telling me ever think i no on mysql is gone not here no more at all???????
  9. i keep getting database error please help... ! ) Deprecated: mysql_real_escape_string(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\seotoolsgroupbuys\done\admin_add_user.php on line 28 i have tried pdo and mysql and mysqli please help....... <?php $dbhost = "localhost"; $dbname = " "; $dbusername = "root"; $dbpassword = "liononabridge"; $link = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbusername,$dbpassword); $link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); try { $statement = $link->prepare ("INSERT INTO user_add (`id`, `user_id`, `user_paypal_email`, `user_skype_name`, `user_package_type`, `user_date_added`) ) VALUES(NULL, NULL, 'john@paypal.com', 'nicky@skpe.com', 'Keyword Tool', '22112017')"); $statement->execute(array("Bob","Desaunois",18)); } catch(PDOException $e) { echo $e->getMessage(); } ?> here what i got and still error <?php //Turn the erros off , so when file deleted no php and mysql error..... //error_reporting(0); //@ini_set('display_errors', 0); $servername = "localhost"; $username = "root"; $password = "liononabridge"; $conn = mysqli_connect($servername, $username, $password); if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } if(isset($_POST['submit'])){ // add a date $user_date_added=date('m.d.y'); //post all the varables to the database. $user_paypal_email=mysql_real_escape_string($_POST['user_paypal_email']); $user_skype_name=mysql_real_escape_string($_POST['user_skype_name']); $user_package_type=mysql_real_escape_string($_POST['user_package_type']); mysqli_select_db($conn, "seotoolsgorpbuys_tool"); mysqli_query($conn, "INSERT INTO add_user (`id` , `user_id `, `user_paypal_email` , `user_skype_name` , `user_package_type` , `user_date_added` ) VALUES( NULL , NULL , '$user_paypal_email' , '$user_skype_name' , '$user_package_type' , '$user_date_added' )"); echo "New record created successfully"; exit; } ?> SQLSTATE[42000]: Syntax error or access violation: 1064 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 ') VALUES(NULL, NULL, 'john@paypal.com', 'nicky@skpe.com', 'Keyword Tool', ' at line 1
  10. hi there all i need the code that adds the url to a page like in the new forums cheers. you get a image of that website and the url of the page can anyone help please thank you like if i type www,google.com <<< you get a image and link automaticly..
  11. This needed removing .. <div align="center" class="mainpagekeyword" style="color: #000033;">fishing tackle</div> dont it another way SOLVED
  12. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="Kenai River Fishing In Alaska, Kenai Alaska Fishing information and cheap products" /> <meta name="keywords" content="kenai alaska fishing,kenai fishing alaska,fishing kenai alaska,fishing alaska kenai,alaska fishing kenai,kenai fishing products," /> <title>Kenai River Fishing - kenairiverfishing.co.uk</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" /> <style type="text/css"> body { background-color: #339999; } .fixcenter { border: 2px solid #000000; } .fixcenter { background: none repeat scroll 0 0 #0000FF; } .nav .current { background: none repeat scroll 0 0 #000000; } .nav a { color: #000000; } </style></head> <body> <div class="fixcenter" align="center"> <div align="center"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td height="100" rowspan="2" valign="middle" align="center">&nbsp</td> <td height="50" align="center" valign="bottom" style="color: #000033;"><h1 class="tittle">Kenai River Fishing - kenairiverfishing.co.uk</h1></td> </tr> <tr> <td height="30" align="center" valign="top"><img alt="image" src="/images/slogan.jpg" /></td> </tr> </table> </div></div> <div class="fixcenter"> <p class="nav"> <a href="/" class="current">Home</a> | <a href="/view/link">link</a></p></div> <div class="fixcenter"> <div class="column_left"> <div class="topads"> <script type="text/javascript"><!-- google_ad_client = "ca-pub-1312898102505018"; /* add5 */ google_ad_slot = "2707702686"; google_ad_width = 468; google_ad_height = 60; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <a class="mainpagekeyword" href="cat/fishing-boats"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing boats</div></a> <a class="mainpagekeyword" href="cat/fishing-tackle"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing tackle</div></a> <a class="mainpagekeyword" href="cat/fishing"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing</div></a> <a class="mainpagekeyword" href="cat/fishing-reels"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing reels</div></a> <a class="mainpagekeyword" href="cat/fishing-gear"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing gear</div></a> <a class="mainpagekeyword" href="cat/fishing-equipment"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing equipment</div></a> <a class="mainpagekeyword" href="cat/fishing-rods"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing rods</div></a> <a class="mainpagekeyword" href="cat/fishing-lures"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing lures</div></a> <a class="mainpagekeyword" href="cat/fishing-games"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing games</div></a> <a class="mainpagekeyword" href="cat/fishing-knots"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing knots</div></a> </div> <div class="column_right"> <script type="text/javascript"><!-- google_ad_client = "ca-pub-1312898102505018"; /* add3 */ google_ad_slot = "5800769888"; google_ad_width = 160; google_ad_height = 600; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <div style="clear: both;"></div> </div> <div class="fixcenter" align="center"> <div class="footertext"> <p> <a href="/view/privacy-policy">Privacy Policy</a> <br /> <a href="http://www.kenairiverfishing.co.uk/">http://www.kenairiverfishing.co.uk/</a> - <a href="http://answers.yahoo.com/">Powered by Yahoo! Answers</a> </p> </div> </div> </body> </html> code indented still dont see the div Line 56, Column 124: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag //line 56 /////////// <a class="mainpagekeyword" href="cat/fishing-boats"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing boats</div></a> <a class="mainpagekeyword" href="cat/fishing-tackle"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing tackle</div></a>
  13. sorry didnt think of indenting, i have been iming for a while, dont use php oa lot any more got bills, needed better money and adsence and seo and backlinks do it for me, so i am very rusty in php. sorry i posted in thje php forum becouse i am tunnel blind and all my setup for forums is set on php helping. i would like to see how good you are, i would like you to get someone blind fold you and do a easly html page then think my god redarrow does all that some times every day in the dark and php,xhtml,mysql,javascript and ajax..... can U!! ps. also u been here for years and u still think posts means how good u are at php yee ok ask a admin.
  14. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="Kenai River Fishing In Alaska, Kenai Alaska Fishing information and cheap products" /> <meta name="keywords" content="kenai alaska fishing,kenai fishing alaska,fishing kenai alaska,fishing alaska kenai,alaska fishing kenai,kenai fishing products," /> <title>Kenai River Fishing - kenairiverfishing.co.uk</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" /> <style type="text/css"> body { background-color: #339999; } .fixcenter { border: 2px solid #000000; } .fixcenter { background: none repeat scroll 0 0 #0000FF; } .nav .current { background: none repeat scroll 0 0 #000000; } .nav a { color: #000000; } </style></head> <body> <div class="fixcenter" align="center"> <div align="center"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td height="100" rowspan="2" valign="middle" align="center">&nbsp</td> <td height="50" align="center" valign="bottom" style="color: #000033;"><h1 class="tittle">Kenai River Fishing - kenairiverfishing.co.uk</h1></td> </tr> <tr> <td height="30" align="center" valign="top"><img alt="image" src="/images/slogan.jpg" /></td> </tr> </table> </div></div> <div class="fixcenter"> <p class="nav"> <a href="/" class="current">Home</a> | <a href="/view/link">link</a></p></div> <div class="fixcenter"> <div class="column_left"> <div class="topads"> <script type="text/javascript"><!-- google_ad_client = "ca-pub-1312898102505018"; /* add5 */ google_ad_slot = "2707702686"; google_ad_width = 468; google_ad_height = 60; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <a class="mainpagekeyword" href="cat/fishing-boats"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing boats</div></a> <a class="mainpagekeyword" href="cat/fishing-tackle"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing tackle</div></a> <a class="mainpagekeyword" href="cat/fishing"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing</div></a> <a class="mainpagekeyword" href="cat/fishing-reels"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing reels</div></a> <a class="mainpagekeyword" href="cat/fishing-gear"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing gear</div></a> <a class="mainpagekeyword" href="cat/fishing-equipment"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing equipment</div></a> <a class="mainpagekeyword" href="cat/fishing-rods"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing rods</div></a> <a class="mainpagekeyword" href="cat/fishing-lures"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing lures</div></a> <a class="mainpagekeyword" href="cat/fishing-games"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing games</div></a> <a class="mainpagekeyword" href="cat/fishing-knots"><div align="center" class="mainpagekeyword" style="color: #000033;">fishing knots</div></a> </div> <div class="column_right"> <script type="text/javascript"><!-- google_ad_client = "ca-pub-1312898102505018"; /* add3 */ google_ad_slot = "5800769888"; google_ad_width = 160; google_ad_height = 600; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <div style="clear: both;"></div> </div> <div class="fixcenter" align="center"> <div class="footertext"> <p> <a href="/view/privacy-policy">Privacy Policy</a> <br /> <a href="http://www.kenairiverfishing.co.uk/">http://www.kenairiverfishing.co.uk/</a> - <a href="http://answers.yahoo.com/">Powered by Yahoo! Answers</a> </p> </div> </div> </body> </html> every time this code is valadated from wc3 keeps telling me there a div not there or two meny please help going mad
  15. not allowd ok
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.