Jump to content

nook6

Members
  • Posts

    14
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

nook6's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. well im sorry YOUR way DOESNT fit my needs im glad you berate people because YOUR answer doesnt fit what they need . i didnt realise you were the php god and YOUR way is the only way it should be done.
  2. HI Unfortunately this method is not feasable for the script im doing if i was only going to run one or two raffles that would be good but i dont want to be setting up tables for every raffle that is run. Nook6
  3. Hi i cant do it like that because in my actual table there are more than one raffle so in the actual table it is item number which holds what raffle they are buying then thier name and thier ticket numbers (so you could buy 5 tickets for raffle 1 and three for raffle 2 and they are all stored in same database i just search for raffle name to get the results for that raffle)
  4. Im trying to write some code for a raffle, when someone buys one ticket it works well but if someone buys ten tickets. i would like it to put each one on a new row, the last column is the ticket number which is got by another table called count and i want the new count in the last column of each row. In the actual script there is more than two columns but this is an example just to try to let you know what im trying to do. As you can see i want the ticket number to increment by one every time someone buys tickets. (the ticket number is in a simple table with just id and ticket number) EXAMPLE someone buys 2 tickes name | ticket number John | 1 john | 2 then someone buys three tickets jane | 3 jane | 4 jane | 5 This is what i have. (WORKING EXAMPLE of the code tha doesnt work.) as you can see the ticker number stays the same and not increment by one. <?php $num //is a number between 1 and 10 $tr //is the current count got from database (this needs to count up by one every entry) include 'includes/connect.php'; $num = "3"; // number of tickets someone buys. $count = "5"; // count of tickets already sold (so this is start count for this transaction). $id = "1"; // this is the line the counter is on to keep count updated for the amount of tickets sold. $name = 'john'; //example name for($i=0;$i< $num;$i++){ $count="$count+1"; // increments count by 1 $sql123 = "UPDATE count SET count=$count WHERE id='$id'"; //should update database to new count $sql = "INSERT INTO test (name, number) VALUES ('$name', '$count')"; if($result = mysqli_query($con, $sql)){ echo "<br>tickets bought and entered into database,<br>Thank you<br>"; } else { echo "Error: " . $sql . "<br>" . $con->error; } } ?> Not sure what im doing wrong? Thank you in advance Nook6
  5. i thought i had explained lol. ok let me try again, lets say someone buys a php script from me to use on www.doable.com, then he decides to give a copy of my script to his friend. now his friend will have a free copy of a script that im selling. so im looking for a way of the script letting me know where its running from so i can see if they have paid or not for that script. have i explained it a little better this time?? nook
  6. Hi Well i was thinking more of using the url that the end buyer would setup in the config settings for the script to use, then all i need to work out is how to get the script on the end users server to send this url to my server in the background, I could setup a switch somewhere so it only sends the url to me once. so i dont get loads of loads of hits everytime someone goes on one of thier sites. Im getting the feeling this isnt really doable lmao thank you nook6
  7. Hi thanks for the reply not sure if you understood the question i am trying to send the url of a php script that is hosted on lets say server1 and send it to a script on server2 (if this is possible) I have the url i just need to find a way of sending it from server 1 to server 2 without any user participation or without the user knowing it has been sent. Nook6
  8. Hi im fairly new here so i would like to say hello to everyone. Now my Question: Im making a few php scripts and im wondering what if anything i can do to find out what url my scripts are running on. maybe some little bit of code in the script somewhere that takes the url and sends it to a script on my website or something? Any help will be greatly appreciated Thank you Nook
  9. Thank you very much krisw44 for your fast response this has helped immensly Nook6
  10. Hi I'm very sorry if I'm posting this in the wrong place. I'm trying to work out how to put a version check into my scripts so when people sign into thier admin section it tells them whether they are running the latest version of the script? Any pointers would be gratefully received. Thank you in advance Nook6
  11. Hi Im sorry im still having problems with this i know it is now my coding so here is the page with the coding on. This is index.php [code] <html> <head> </head> <body bgcolor=black text=yellow> <center><img src=images/banner.jpg><br><br> <a href=index.php><img src=images/home.jpg border=0></a> &nbsp;&nbsp; <a href=games.php><img src=images/games.jpg border=0></a> &nbsp;&nbsp; <a href=wip.php><img src=images/wip.jpg border=0></a> </center> <? if (isset($_POST['games'])){include('games.php');} elseif (isset($_POST['wip'])){include('wip.php');} else {include('index.php');} ?> <? include('footer.php'); ?> </body> </html> [/code] This is the url to the page just in case you want to see whats happening [url=http://daves.servegame.com/website/]http://daves.servegame.com/website/[/url] This is just a simple page i put together to test this on so it isnt looking very good lol. Any help would be appreciated thank you Nook6
  12. Hi yes im looking to have one page (index.php) that just calls the other parts (e.g. header and footer called at the top and bottom) then it calls whatever page by what link the person clicks so if the person clicks home page it calls index page and puts page one info into it if they call page 2 then it clls index.php and it puts page2.php info onto the page.  the only other thing i can say is in html i used to do this with an iframe to load the pages and then i hade the links header and footer all staying the same and just the iframe changing the pages? i hope that helps a little more. Nook6
  13. Hi This may be a bit difficult to understand but i will try to explain it as best as i can. I am making my first php website and i have a header and footer page the links are in the header. i have my index page which just pulls external files (header.php mainpage.php and footer.php) what i want to know is if someone clicks one of the links at the top of the page can i change the mainpage.php to the page they want to look at so im using the one page just to pull in other external pages on my website?. I hope someone can understand what im talking about but if you have any problems just ask for the information you need and i will answer. Nook6 Thanks in advance.
×
×
  • 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.