Jump to content
#StayAtHome ×


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About bleemster

  • Rank

Recent Profile Visitors

311 profile views
  1. I have searched a lot for the answer to "how to create a friends and family paypal button" (not a paypal service button) with no success. I've now emailed Paypal to ask how to create a F&F button, still waiting on their response. I have looked through some of the paypal forums and the ones i found were people from 2013 saying "you cant" but i cannot believe that with the scripting available now-a-days that this is an impossibility! I think the closest i have come is using paypal.me but each of my users will need to create a paypal.me account which i dont think is the way to go.
  2. lol im 37 years old and a Microsoft Technical Consultant, so certainly not a "homework project" This is the actual code that PayPal provides with the hidden values etc. Im actually making something for a forum group I belong to and wanted this done and dusted. The reason I 'strenuously' asked for help (which I didn't receive) is that every where i searched in google (yes I did search - a lot) because I started to panic that "friends and family" option is not an option and that I wondered if a PHP help forum might know about this already and have the answer. But i guess the answer is "carry on googling it as help is not provided here" So PHPMillion i will even give you the "best answer" vote as it was the most helpful post i've ever received and surely its not to just help bump your post count. Strange way to run a help forum - tell people to go away lmfao
  3. Hi all This part is integral to my site and im panicking as i cant seem to find an answer... When someone clicks a link on my page with the below code it only does it as services... how can i create a paypal link to charge as friends and family PLEASE PLEASE PLEASE HELP <form id="payid" name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="<?php echo $row1['EMAIL']; ?>"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="item_name" value="BALL"> <input type="hidden" name="amount" value="<?php echo preg_replace( '/[^0-9,"."]/', '', $row['PRICE'] ); ?>"> <!--<input type="hidden" name="return" value="http://www.theeasypc.co.uk/lottery/heandal.php">--> <input type="hidden" name="return" value="http://www.theeasypc.co.uk/lottery/heandal.php?success=1"> <input type="hidden" name="cancel_return" value="http://www.theeasypc.co.uk/lottery/heandal.php?error=1"> <!-- Where to send the PayPal IPN to. --> <input type="hidden" name="notify_url" value="http://www.theeasypc.co.uk/lottery/heandal.php" /> <input type="image" src="http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form> I can see the its set to business in one flag but ive tried to change thie to f&f, personal, friends, family, nothing works also tried "_donations"
  4. I seem to be having trouble pulling in information from two tables... I can get all the info from the data table and display it in tables but how to i replace the code as shown with xxxxxxxxx with the FULLNAME field from the USER table which is associated with the USERNAME or $_SESSION Username? Thanks in advanced <?php error_reporting(E_ALL); ini_set('display_errors', '1'); session_start(); if(!isset($_SESSION['username'])){ header("Location:login.php"); } require('connect.php'); // create query $query = "SELECT * FROM data WHERE CREATOR='xxxxxxxxx' AND AVAILABILITY > 0 ORDER BY ID DESC"; $query2 = "SELECT * FROM user"; $query3 = "SELECT * FROM data WHERE CREATOR LIKE 'xxxxxxxxxx' AND AVAILABILITY = 0 ORDER BY ID DESC LIMIT 10"; // get results $result = mysqli_query($connection, $query); $result2 = mysqli_query($connection, $query2); $result3 = mysqli_query($connection, $query3); // Fetch data $data = mysqli_fetch_all($result, MYSQLI_ASSOC); $user = mysqli_fetch_all($result2, MYSQLI_ASSOC); $data2 = mysqli_fetch_all($result3, MYSQLI_ASSOC); // var_dump($user); // free result mysqli_free_result($result); mysqli_free_result($result2); mysqli_free_result($result3); // Close Connection mysqli_close($connection); ?>
  5. hi psycho thank you for your detailed reply. 70% of what you suggested is WAY over my head and im trying to learn and this has been built over SO much research so expect there are a lot of conflicts and errors etc. As it is at the time of the code below: the insert of data into the thunderball table does insert into the SQL DB correctly the ID field is there the ID field does auto increment if i left the script alone as it is i could live with it but this is to learn why some of the stuff ive found on the internet says "do this and do that" and it doesnt work !!! - all i want to do is print the ID and figure out why its not working. the photo part was a right pain in the ass to complete. As you can see for housekeeping purposes i want all the photos named with the ID of the game ID which is the same ID im trying to print (and failing) and calling photo1 as "a" e.g. ID123a.jpg i just dont get why i know the ID variable is obviously set as shown in the photo function, but when i try to echo the $ID again it says that its not been set!!!!!!!!! Melting my brain I am more than happy to replace the SQLI to PDO, do i just do a find and replace? do the commands associated with PDO differ from the SQLI?
  6. I want the "thunderball created successfully" to have a message "your ID is ID=[iD from the newly created table entry]" But cant seem to pick up the ID as im guessing it hasnt been created and passed to SQL yet here is my script <?php error_reporting(E_ALL); ini_set('display_errors', '1'); session_start(); if(!isset($_SESSION['username'])){ header("Location:login.php"); } require('connect.php'); if (isset($_POST['submit'])) { $creator = mysqli_real_escape_string($connection, $_POST['creator']); $coin = mysqli_real_escape_string($connection, $_POST['coin']); $information = mysqli_real_escape_string($connection, $_POST['information']); $price = mysqli_real_escape_string($connection, $_POST['price']); $rundate = date('d/m/Y h:i:s', time()); $date = date('d/m/Y h:i:s', time()); $query = "INSERT INTO `thunderball` (creator, coin,information,price,photo1,photo2,photo3,DATESTAMP,rundate) VALUES ('$creator', '$coin','$information','$price','','','','$date','$rundate')"; $result = mysqli_query($connection, $query); $sql = "SELECT ID FROM thunderball ORDER BY ID DESC LIMIT 1"; $rs = mysqli_query($connection,$sql); $row = mysqli_fetch_array($rs); $id = $row['ID']; if($_FILES['photo1']['name'] !='') { $temp = explode(".", $_FILES["photo1"]["name"]); $newfilename = "ID".$row['ID']."a". '.' . end($temp); move_uploaded_file($_FILES["photo1"]["tmp_name"], "images/photos/" . $newfilename); $sql = "Update thunderball SET photo1 = '$newfilename' Where ID='$id'"; mysqli_query($connection,$sql); } if($_FILES['photo2']['name'] !='') { $temp = explode(".", $_FILES["photo2"]["name"]); $newfilename = "ID".$row['ID']."b". '.' . end($temp); move_uploaded_file($_FILES["photo2"]["tmp_name"], "images/photos/" . $newfilename); $sql = "Update thunderball SET photo2 = '$newfilename' Where ID='$id'"; mysqli_query($connection,$sql); } if($_FILES['photo3']['name'] !='') { $temp = explode(".", $_FILES["photo3"]["name"]); $newfilename = "ID".$row['ID']."c". '.' . end($temp); move_uploaded_file($_FILES["photo3"]["tmp_name"], "images/photos/" . $newfilename); $sql = "Update thunderball SET photo3 = '$newfilename' Where ID='$id'"; mysqli_query($connection,$sql); } if($result){ $smsg = "Thunderball Event Created Successfully."; }else{ $fmsg ="Thunderball Event Creation Failed"; } } $sql1 = "select fullname from user WHERE USERNAME='{$_SESSION['username']}'"; $result1 = mysqli_query($connection,$sql1); $row1 = mysqli_fetch_array($result1); $fullname = $row1['fullname']; //echo $fullname; ?> <html> <head> <title>TB Creation Wizard</title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" > <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" > <link rel="stylesheet" href="styles.css" > <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <form class="form-signin" method="POST" enctype="multipart/form-data"> <?php if(isset($smsg)){ ?><div class="alert alert-success" role="alert"> <?php echo $smsg; ?> </div><?php } ?> <?php if(isset($fmsg)){ ?><div class="alert alert-danger" role="alert"> <?php echo $fmsg; ?> </div><?php } ?> <h2 class="form-signin-heading">Create a TB Event</h2> <input type="hidden" name="creator" id="inputCreator" class="form-control" placeholder="Creator" value="<?php echo $fullname; ?>" > <input type="text" name="creator" id="inputCreator" class="form-control" placeholder="Creator" value="<?php echo $fullname; ?>" disabled> <input type="text" name="coin" id="inputCoin" class="form-control" placeholder="Coin on offer (E.g. 50p)" required autofocus> <input type="text" name="information" id="inputInformation" class="form-control" placeholder="Coin Infomation (E.g. Kew Gardens)" required autofocus> <input type="text" name="price" id="inputPrice" class="form-control" placeholder="Price of each Ball (E.g. £5.50)" required autofocus> <input type="file" name="photo1" id="inputPhoto1" class="form-control" placeholder="Photo1 of the Coin" autofocus> <input type="file" name="photo2" id="inputPhoto2" class="form-control" placeholder="Photo2 of the Coin" autofocus> <input type="file" name="photo3" id="inputPhoto3" class="form-control" placeholder="Photo3 of the Coin" autofocus> <!--<input type="date" id="myDate" />--> <script type="text/javascript"> function SetDate() { var date = new Date(); var day = date.getDate(); var month = date.getMonth() + 1; var year = date.getFullYear(); if (month < 10) month = "0" + month; if (day < 10) day = "0" + day; var today = year + "-" + month + "-" + day; document.getElementById('myDate').value = today; } </script> <!-- <body onload="SetDate();"> <br><br>--> <!--<input type="date" name="rundate" id="inputRunDate" class="form-control" placeholder="Run Date" required autofocus> <br>--> <br> <input class="btn btn-lg btn-primary btn-block" type="submit" value="Create" name="submit"> <br> <a class="btn btn-lg btn-primary btn-block" href="login.php">Home</a> <a class="btn btn-lg btn-primary btn-block" href="logout.php">Logoff</a> </form> </div> </body> </html>
  7. currently MySQLI - i will check the link - thank you
  8. I understand from all languages we have to define a variable. even php the define command is used... Can someone show me a simple script to pull the ID field from a DUMMY sql table and then display it. i have a connection.php page defined and connects correctly. table = DUMMY fields = ID, name, email I want a page to say: <head></head> <body> <H2>Welcome to page [iD]</h2> </body> Thank you in advance.
  9. Thank you. I did originally write that in the url tied to a dummy entry in the table but didnt work, hense the post, and now without doing anything it works !!! random. but thank you again.
  10. sorry, it is all *.php files, with integrated html, rather than the other way around. Im pretty good with HTML and can read a html script and thoroughly understand it... its the PHP part I cannot write very well. I can kinda-read php and get an understanding. Here is the very START of my display script, but it doesnt display anything other than the HTML table header - and from what i see this as if it was working is it would display horizontally where i want vertically. I know its just a matter of jigging the th and tr tags but wondered what the jig is lol. More so need to get it working first before i can move it around And yes i mean create a link... i want the URL to display this PARTICULAR entry from the table based on the ID = 1 (or what ever number... so ID = 9 would be a completely different game
  11. Hi I am a noob so please forgive my 1% knowledge on php but got to start somewhere. Brief... I am creating a bonus ball purchase app. A user can goto www.mysite.com/results.php?ID=1 and purchase a number 1-14 as a bit of a "finally thought of a reasonably complex php/sql scripting" See screen print of the final result for the end user. I am trying to create as much as I can and have created the registration, login, forgot password... so im slowly getting there. My SQL table is roughly like ID (Pri Key, Unique) Creator Date A Photo firstly... I want to be able to type in a url of a page based on the ID of the line in the table eg www.mysite.com/results.php?ID=1 how would i do this? secondly... How do i display in a fancy table/php vertically ================ CREATOR | John Smith DATE | 1/1/2018 PHOTO1 | <display a photo from /images/photos/ID1a.jpg << the 'a' represents the 1st of 3 possible photos. But i could replicate the code to add ID1b and ID1c ================ I think with this answered i could work out how to add the rest of the fields Thirdly... On my registration, is there a php line i could add that sends me an email with the persons USERNAME when they register so i can go in and activate manually. Many Thanks Lee TODO... A creator creates a bonus ball raffle The raffle page the end use see's sees paypal links which need to be linked to the creators paypal When a user buys a number, the purchase option disappears and replaces the field with their name The "available numbers" field decreases from 14 to 0 based on how many numbers purchased Once the available numbers - 0 the status change to "FULL" from "AVAILABLE" Once the last number is purchased displays the next lottery draw date being Tue, Wed, Fri or Sat (here in the uk)
  • 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.