denno020
Members-
Posts
761 -
Joined
-
Last visited
-
Days Won
3
Everything posted by denno020
-
Submit the form and then see if you still get the notice. (I'm pretty sure you won't) All it's doing is telling you that a form hasn't been submitted, $_POST['submit'] doesn't exist, which, for the first time the page is loaded, will certainly be the case. Once the form is submitted and the page is reloaded, $_POST['submit'] will exist, you won't get the notice, and your if statement will run. Denno
-
Sorry retract that... didn't work as well as I had hoped :S
-
SELECT table1.id, table1.name, table2.job, table3.notes FROM table1, table2, table3 WHERE table1.id = table2.employeeID and table2.employeeID != table3.employeeID; That seemed to work for me . Denno
-
<html> 02. <head> 03. <script type="text/JavaScript"> 04. function ExitPage() 05. { 06. alert ('Before You Leave:\n\nPlease Check our new tutorials on <a class="linkifierplus" href="http://www.mistonline.in.\n\nMore">http://www.mistonline.in.\n\nMore</a> than 250 tutorials.\n\nPlease submit your own tutorials for free\n\nA complete reference for webmasters!!!!!.'); 07. getit() 08. } 09. function getit() { 10. askit = confirm("Leaving so soon? Why not stay a little longer!"); 11. if (askit == true) 12. alert('Thanks'); 13. else 14. if (askit == false) 15. alert("Visit again soon!"); 16. } 17. </script> 18. </head> 19. <body onbeforeunload="ExitPage();"> Found this code on http://www.tutorialized.com/view/tutorial/Alert-a-message-before-leaving-a-web-page-using-javascript/65638. Denno
-
Does each form get submitted one after the other? Like a multiple step process? What I would do is put the results straight into your database, after each step (so each form being submitted), and then the Paypal IPN will mark each record as being paid, if/when payment is successful. If payment isn't successful, you'll have a record in your database that isn't required, and you can make a script that will go through all records to find ones that have been sitting there for a day or so, and haven't made successful payment, and remove them. This is what I would imagine as being the easiest way to do it, rather than passing the post variables over from one form to the other. Which is possible, but then you can only pass certain fields to the paypal IPN script (very irritating), so putting the results into the database as you go, and then sending just the required information to paypal would be the easiest I believe.. Denno
-
Sorry guys, had a s*** day so tend to take things in the wrong way.. We'll wait and see what the changes bring then . Denno
-
That's a pretty good point about running queries before being connected to the database, oops. Thanks for the sql injection fix up too.
-
No need to be smart. Even if I was posting this to bump up my post count, I would only get 1 or 2, depending on replies. Whereas I could have just gone through and posted a thankyou on each of the threads that I liked an bumped it up by much more. That's beside the point anyway, I was seriously suggesting it, I don't believe the sneer remark was called for..
-
I would agree with all the replies here. it's going to be very hard for anyone to come up with a social networking site which is made for being social, as there is already facebook, and it's unlikely anything will better that. You need some sort of a hook, that will make people want to join and have some commonality between each other (a game, as already been suggested). You may already have your hook, but as crmamx has just disliked (myself too), you need to sign up before you can see what's going on with it. Hopefully you've got some information pages in the works so people know what they're signing up to, or even, to make people want to sign up. I like the menu on the left though, works well . Denno
-
Is there any chance a 'thank you' button can be added to the posts? I've checked out the SMF mod site and there is a mod for the forum called Thank-O-Matic which could work . Here is the link: http://custom.simplemachines.org/mods/index.php?mod=710 There are a few posts where I've wanted to say thankyou, but adding a reply of just thank you seems a bit much... Cheers Denno
-
<?PHP session_start(); /* get user id */ $user_id = $_SESSION['username']; /* get the seat number */ $seat_id = $_GET['seat']; //NEW CODE STARTS HERE $sqlCommand = "SELECT taken FROM seats_table WHERE seat_id = $seat_id"; $query = mysql_query($sqlCommand, $myConnection) or die (mysql_error()); while($row = mysql_fetch_array($query)){ $taken = $row["taken"]; } mysql_free_result($query); //Check if seat is taken if($taken == 1){ echo "That seat is taken, please go back and select another"; exit(); //will stop processing the rest of the script, so nothing else will be shown. } //NEW CODE ENDS HERE /* connect to data base */ require ('./secure/connect.php'); /* create query */ $query = "UPDATE seats_table set taken = FALSE, user_id = '0' WHERE user_id = '$user_id'"; $query2 = "UPDATE seats_table set taken = TRUE, user_id = '$user_id' WHERE id = '$seat_id'"; /* $query3 = "UPDATE users set signed_up = '3' WHERE username = '$user_id'"; */ /* execute the query */ $result = mysql_query($query); $result2 = mysql_query($query2); /* $result3 = mysql_query($query3); */ /* advise user their seat has been reserved */ include 'seating.php'; ?> That's something I've just whipped up for you. You can see where I've added code. I haven't tested it, so there might be some silly errors in there, but nothing that you won't be able to figure out . Hopefully that helps. Denno
-
Thanks mate, you've just helped me out heaps here .
-
Welcome to the forum. I'm not sure of the exact coding you would need, but I do know how you could go about getting it done. You would store the date that the bus 'starts' or whatever. Then on any day later than that, use PHP and the date functions to find out how many days between the current day the the 'start' day. You then divide the difference by 2. To make it easy, instead of using '/' as the divide operator, use '%', which will give the remainder as a result. In if tags you then say: if(($days_difference % 2) == 0){ //the bus will run today }else{ //the bus won't run today } Does that make sense? Denno
-
as Zurev suggested, you probably shouldn't completely remove IE from the access list.. You really need to set up a style sheet for IE. Obviously without the coolness of CSS3. You can just display a message to the user that you know they're using IE and they won't get the full experience of your website unless they switch to a (better) browser like Chrome or Firefox.. Denno
-
What is that 'true' bit part of? I'm not sure if that will work being there how it is.... Denno
-
Yeah sorry bout that.. I'm not familiar with OOP stuff, so I don't really think in those terms yet..
-
$array = array(array(1, item1), array(2, item2), array(3, item3)); for($i ; $i < ($array length) ; $i ++){ for($j ; $j < ($array length) ; $j++){ echo $array[$i][$j]; } } Something similar to that. I'm not sure how to get the array length, which is why i've just written $array length, but it shouldn't be too hard to figure that bit out.. Basically you want a for loop for the index part of the array, and then an inner for loop for all the things associated with that index. Hope that helps Denno
-
Well I've just been playing with it, and the only thing I can suggest is, have you got the connection to your database working correctly? I was getting the same error as you until I added the real connection to my testing database. No errors anymore.. So look at your connection to mysql script and make sure that's right. Correct database name, username and password.. Denno
-
Again, session_start() must be the very first thing in your file.. Move it to just after '<?' This goes with any and every php file that you want to be able to access SESSION with. Denno
-
Sorry I just saw in your original post about the shopping cart code. Can I instead get membersarea.php code. Or at the very least, a chunk of code around line 19. Denno
-
Where is the shopping cart code? Denno
-
I like the look. And I love the fireworks on the index page. How did you manage these? Is it a stock image or something you made? What I would suggest is to have a Home navigation link. Not all people are aware to press the logo to go back to the index page. I am aware that the index page doesn't offer anything that the other pages don't show, hence it's more like a splash page, but I was still navigating through your site with an intention of going back to that page (mainly to check out the cool graphic ). Denno
-
you need to have session_start() as the first thing in your script. Try moving that line of code above ob_start(). Otherwise, what errors are you getting? If you specify the actual errors, then maybe we could help more.. Denno
-
I am having trouble with sessions? Getting a error. Help!
denno020 replied to Alex1646's topic in PHP Coding Help
As said above, you're using the comparator equals signs, not assigning. You typed them fine when assigning the post variables, so I'm not sure why you would have changed? Denno -
Help with displaying content from two fields that equal the same
denno020 replied to ace2721's topic in PHP Coding Help
I dont know exactly how to do it, but I know that you're going to want to look at Joins. You will join the two tables using the ID and title, and then you can easily echo out the dates.. Again, I don't know how to do this off the top of my head. I could easily do a Google search, find out and then tell you, but it will be much more beneficial to you if you Google it yourself . Denno