Jump to content

debuitls

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

About debuitls

  • Birthday 12/04/1985

Profile Information

  • Gender
    Male
  • Location
    Dublin, Ireland

debuitls's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks for getting back to me Crayon Violent. Yes the variables hold the correct values. The problem is with the 'greater than' part. If the variable holds a four starrating it wont and there is only a five starhotel it wont find the larger starrating. If the variable holds a five starratting and the there is a five starrhotel then it works fine. Can anyone help
  2. Hi all, Im trying to select all the email address where the county is equal to the county variable and the starrating is is bigger or equal to the $starrating variable. $sql = "SELECT signuphotel.email FROM proposal LEFT JOIN signuphotel ON proposal.county = signuphotel.county AND proposal.starrating = signuphotel.starrating WHERE proposal.county = '$county' AND proposal.starrating >= '$starrating' AND proposal.time = NOW() "; This statement returns correctly in phpmyadmin. However when I run it in my php script I get an error saying "No recipient addresses found in header" if starrating variable is set to starrating of 4 and the there is only hotels with 5 starrating in the table. It might be straightforward question but can anyone see where im going wrong?? Thanks
  3. Thank for getting back to me ozestretch. I'm new to php, so im not sure I understand your suggestion with regards the time offset? Ill rephrase my question just to ensure I'm being clear. Ill set the query to NOW()- INTERVAL 2 DAY So obviously all the relevant proposals made within the last 48 hours will be returned. I want all the proposals from the last 2 days to be returned because the auction runs for 24 hours, and then the user has a chance to accept these offers for a further 24 hours. After this 48 period the proposal should drop off the screen. Now where the proposal is printed there is contdown row which countsdown from 24hrs. What im trying to do is after the 24hrs of the auction i want it to print 'end of auction' as the 24 hrs have expired but I still want the proposal on screen because the user can still accept the bid for another 24hrs. Really appreciate if anyone could get suggest anything on this. Thanks
  4. Hello all, Having a bit of a problem and not sure where to start with. Maybe someone here could point me in the correct direction. I have the following code. $result = mysql_query("SELECT proposal.*, count(bid.proposalid) AS bids,SYSDATE(), TIME_FORMAT(TIMEDIFF(tomorrowtime, SYSDATE()), '%H hours, %i minutes') AS timeleft FROM proposal LEFT JOIN bid ON proposal.proposalid = bid.proposalid WHERE proposal.username = '$username' AND proposal.time > NOW()- INTERVAL 1 DAY GROUP BY proposal.proposalid"); This returns a set of results which I echo to the screen If you see there I have a where NOW()- INTERVAL 1 DAY. I want to change this to an interval of 2 days so that results for the last two days are returned However because its a 24 auction im building whereby the auction runs for 24hrs and there is a period of 24hrs where people can accept the bids I want the timeleft row only to countdown for first 24 hours and then stop and say someting like 'end of auction' . Anyone have an idea how to do this? Any suggestions really appreciated! Thanks
  5. Thanks for all your help Bricktop. This is working perfectly now.
  6. Thank you for your time and help Bricktop. The page is loading now fine. However, when you click on the image it fails to open a the new window with the page in it. Can anyone suggest why this might be the case?
  7. ok so notepad has stopped highlighting any errors in the code but im still just getting a white page when I load. while($row = mysql_fetch_array($result)) { echo '<div class="rbroundbox"> <div class="rbtop"><div></div></div> <div class="rbcontent">'.'<div class="mydiv">'." ".$row['hotelname'].", ".$row['address1'].", ".$row['address2'].", ". $row['county'].'</div>'."<p> </p>".'<div class="urdiv">'."<br/>"." "."<img src=http://www..com/Website/images/".$row['logo'] ." alt='logo' rel='lightbox[mando]' border='1' height='100' width='100'>"." ".'</div>'.'<div class="hisdiv">'."<br/>"." <font size = '6'> <strong><b>Hotel Bids &#8364 </b></strong></font>"."<font size = '6'>"."<strong>".$row['hotelprice']."</strong>"."</font size>"."<br />"." Includes: ".$row['addons']."<br />"."Reference Number: " . $row['bookingref']. '<br/>'.'<br />'." ". '<input type="image" src="BookThisHotel.PNG" name="image" width="121" height="24" onclick="window.location=\'bookview.php?em='. $row['email'].'&id='. $row['bookingref'].'&te='.$row['telephone'].'&nh='.$row['hotelname'].'\'">'." ". '<input type="image" src="ViewHotel.PNG" name="image" width="90" height="24" onClick="window.open(\'viewhotel.php?id='.$row['id'].', \'mywindow\', \'width=400, height=200\')'"/>'" .'</div>'.'</div><!-- /rbcontent --> <div class="rbbot"><div></div></div> </div><!-- /rbroundbox -->'; } ?> Heres the updated code. Again it seems fine when I remove that line. Does anyone have any more suggestions. Thank you
  8. Thanks for getting back to me Bricktop, That seemed to resolve the problem in that line but it looks like the line is causing a problem when I put it in the full statement. while($row = mysql_fetch_array($result)) { echo '<div class="rbroundbox"> <div class="rbtop"><div></div></div> <div class="rbcontent">'.'<div class="mydiv">'." ".$row['hotelname'].", ".$row['address1'].", ".$row['address2'].", ". $row['county'].'</div>'."<p> </p>".'<div class="urdiv">'."<br/>"." "."<img src=http://www.xyz.com/Website/images/".$row['logo'] ." alt='logo' rel='lightbox[mando]' border='1' height='100' width='100'>"." ".'</div>'.'<div class="hisdiv">'."<br/>"." <font size = '6'> <strong><b>Hotel Bids &#8364 </b></strong></font>"."<font size = '6'>"."<strong>".$row['hotelprice']."</strong>"."</font size>"."<br />"." Includes: ".$row['addons']."<br />"."Reference Number: " . $row['bookingref']. '<br/>'.'<br />'." ". '<input type="image" src="BookThisHotel.PNG" name="image" width="121" height="24" onclick="window.location=\'bookview.php?em='. $row['email'].'&id='. $row['bookingref'].'&te='.$row['telephone'].'&nh='.$row['hotelname'].'\'">'." ". '<input type="image" src="ViewHotel.PNG" name="image" width="90" height="24" onClick="window.open(\'viewhotel.php?id='.$row['id'].', \'mywindow\', \'width=400, height=200\')'"/>' .'</div>'.'</div><!-- /rbcontent --> <div class="rbbot"><div></div></div> </div><!-- /rbroundbox -->'; } ?> I know its a lot of code but just have a look at the line towards the end after I insert the new line of code. I think there is something wrong here. Can anyone spot what it is? It works fine without the new line of code. Thanks
  9. Hi all, Im trying to figure out how to echo the js on click window.open function. I'm running into some syntax problems though im afraid. I've tried this "<input type=\"image\" src=\"ViewHotel.PNG\" name=\"image\" width=\"90\" height=\"24\" onClick=\"window.open('viewhotel.php?id='.$row['id'].', 'mywindow', 'width=400, height=200')'\"/>" This line of code is concatonated on either side with other code and echoed. Can anyone point out where im going wrong?
  10. Hi MrAdam You were correct it was not a syntax error. The hotelname value I was trying to pass through the URL had a comma in it. When I removed the comma it seemed to work fine. Thanks for your help.
  11. Sorry thats my fault there for posting up the same code twice there. This is the code I was meant to put up. '<button type="button" onclick="window.location=\'bookview.php?id='. $row['bookingref'].'&hn'. $row['hotelname'].'\'">Book Now</button>' Button doesnt go anywhere when you add the second row.
  12. Ah sorry, for wrecking your head now with this. When I add in a second row to be appended to the URL I think i'm making another syntax mistake as the button doesnt do anything *Sorry the code should actually read like this. '<button type="button" onclick="window.location=\'bookview.php?id='. $row['bookingref'].'&hn'. $row['hotelname'].'\'">Book Now</button>' Just wondering if anyone could shed some light on my mistake?
  13. Thanks very much for getting back to me MrAdam. I gave your suggestion a try there and the syntax error was gone. However, the page got a little distorted see example 1. What I really want is for it to look like example 2. However, the buttons in example two dont do anything. I just created them using the code off the w3 schools site. '<button type="button">'."Book me!".'</button>' Wondering if anyone can solve my dilemma? [attachment deleted by admin]
  14. Hi all, I cant seem to spot the syntax error in this line of code. I was wondering if anybody with a fresh pair of eyes can suggest what i'm doing wrong. '<button type="button" onclick=\"window.location='results.php?id=". $row['proposalid'] . "'\">'."Book Now".'</button>' Any suggestions would be much appreciated.
×
×
  • 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.