Jump to content

nd3_2000

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Everything posted by nd3_2000

  1. Hi guys, I have this statement here working in html fine <tr><td ><a href="GetVeh.php?UniqueID=<?php echo "$Reg_No"; ?>"><?php echo "$Reg_No"?></a></td></tr> But I now need to create it in php by echoing the table row but I am getting an error where the Reg no is dissapearing. or all I get is "> Here is the code...I believe i am putting the \ in the wrong place but cannot figure it out. echo "<tr><td><a href=\"GetEmp.php?UniqueID=<?php echo \"$EmpID\"; ?>\"><?php echo $Name ?></a></td> Any idea would be very much appreciated THanks
  2. hi guys, I have looked over Google for this and cant seem to find what I need atall! Basically I have a webpage with small thumbs at the bottom and a main image at the top, I would like to change the main image on the page when I click on any of the thumbnails......... Does anybody have a function they can provide me with or giudance for this as I thought this wqould be easy to find but its not apparantly Cheers Neil
  3. With respect, if you actually read what I have said, it is not an issue of the data not showing when the page is loaded. THAT works fine on both IE and FF. The data is there on BOTH, it is when I click on print preview and also print the page that the data dissapears in IE, so it prints a blank voucher (again ONLY in IE, it prints off fine in FF and is also visible in print preview) The previous pages code simply returns an SQL string, places required values in hidden boxes and on a BUTTON click passes that data to the main voucher page.
  4. No theyre not........this is SO weird...like I said the data is there when you see the page..its just when you go to print preview and also try and print it off all the data dissapears...... Yet it works fine in FF
  5. I am working on a voucher website where companies post offers on the site, then a user clicks a button to get a generic voucher BUT with the companies offer and contact details etc done through a php script using a SQL resultset. Problem is, in Firefox, when you go to print preview and and also print it off the data is there.....BUT in Internet Explorer, the data shows but when you go to print preview and also print it off the data is missing.....this is annoying as the whole point the site is to get companies offers as stated. Am a bit stuck has anyone got any ideas? Here is the code I am using <?php $string1= $_POST['Link']; $string2= $_POST['Link2']; $string3= $_POST['Link3']; $ImageLoc =$_POST['ImageLoc']; header("content-type: image/jpeg"); $wm = imagecreatefromjpeg($ImageLoc); $img = imagecreatefromjpeg("Vouchernew.jpg"); $wmsize = getimagesize($ImageLoc); $imgsize = getimagesize("banner2.jpg"); imagecopymerge($img,$wm,125,5, 0, 0, $wmsize[0], $wmsize[1], 100);//last numeric is image transparancy $text_colour = imagecolorallocate( $img, 0, 0, 0 ); imagestring( $img, 4, 270, 310, $string1,$text_colour );//Compname imagestring( $img, 4, 650, 310, $string3, $text_colour ); //Phone imagestring( $img, 4, 270, 350, $string2, $text_colour ); //Deal imagejpeg($img); imagedestroy($img); imagedestroy($wm); ?> the code works fine, just it wont print the data in IE
  6. Hi Guys... I need to use a browser detector function so depending on which browser is being used changes whilch javascript file I use for posotiong of a drop down box.... Am having problems getting the code right..... this is what I have <script type="text/javascript"> if (navigator.userAgent.indexOf("Firefox")!=-1) document.write("U r using Firefox") if (navigator.userAgent.indexOf("MSIE")!=-1) document.write("u r using IE") </script> THis is working fine and detects either browser BUT I need to add somewhere to use the different jsfile, which ioriginall looks like this <SCRIPT TYPE="text/javascript" SRC="/menu/menu_data2.js"></SCRIPT> So if its IE I want it to use the above file if its FF I want it to use <SCRIPT TYPE="text/javascript" SRC="/menu/menu_data.js"></SCRIPT> Can anyone help scritp this as I keep getting a blank form
  7. GPAUG20 is the JobNo thats being passed through to it
  8. Apologies if this is in the wrong section Im a newbie and novice here! Another user suggested this an event handler, which I copied! function processClick(jobNo){ window.location = "CompleteProof.php?JobNumber=" + jobNo + "&ProofDate=" + document.getElementById('DateLogged').value; } and then calling that viia this <button type="button" onclick="processClick(<?php echo $JobNo; ?>)">Complete Proof</button><br /><br /> which I can sort of get my head around, yet now when I click on the button it gets an error of GP456 is undefined where GP456 is the job number I am sending through
  9. Hi thanks for your advice with that, I kind of understand what you are saying and realised it was to do with the calanders value not being passed, apologies as Im pretty new to this!!! I placed the code in and when runnign it, it gives me an error like this on the button click "GPAUG20 is undefined" when it tries to send the value of the jobNo through! Any ideas? as have no idea of the solution of this!
  10. Hi guys am having a real problem right now, I need to pass a calander control to another page and I cant seem to get it to read the ID of the text box the value is being placed into..... Here is the code <td colspan="2" align="left"><input name="Datelogged" type="text"value ="Click Select" size="15" id="Datelogged" /> <a href="#" name="anchor1" class="style1" id="anchor1" onclick="cal.select (document.forms[0].Datelogged,'anchor1','yyyy-MM-dd'); return false;">select</a></td> </tr> <a href="CompleteProof.php?JobNumber=<?php echo $JobNo; ?>&ProofDate=<?php echo DateLogged; ?>"></BR>[Complete Proof]</a></BR></BR></BR> All I keep getting is this, its just passing through the word Datelogged NOT the date value that is in the text box http://www.xxxxxxxxx.co.uk/CompleteProof.php?JobNumber=PFAug25&ProofDate=DateLogged
  11. Hi guys am having a real problem right now, I need to pass a calander control to another page and I cant seem to get it to read the ID of the text box the value is being placed into..... Here is the code <td colspan="2" align="left"><input name="Datelogged" type="text"value ="Click Select" size="15" id="Datelogged" /> <a href="#" name="anchor1" class="style1" id="anchor1" onclick="cal.select (document.forms[0].Datelogged,'anchor1','yyyy-MM-dd'); return false;">select</a></td> </tr> <a href="CompleteProof.php?JobNumber=<?php echo $JobNo; ?>&ProofDate=<?php echo DateLogged; ?>"></BR>[Complete Proof]</a></BR></BR></BR> All I keep getting is this, its just passing through the word Datelogged NOT the date value that is in the text box http://www.xxxxxxxxx.co.uk/CompleteProof.php?JobNumber=PFAug25&ProofDate=DateLogged
  12. Like the second one sorry should have explained better
  13. Hi Wateressaz, cheers again for yesterday. Anyway that kinda worked, problem is, Im not getting the rows to be next to one another in the first place, it is putting the Breaks in ok I think in the right place but it is still making them come down underneath each ohter and not sure how to make them go next to each other in the first place! This is how I modified it so far $sql = "SELECT * FROM Jobs where Print_Complete=0 and Print_Date=CURDATE()"; $results=mysql_db_query($database_name,$sql,$conn); echo "<h2>Today's Jobs for "; echo(Date("l F d, Y</h2>")); $counter = 1; while ($output=mysql_fetch_array($results)) { if($counter == 5) { $spacer="</br>"; $counter = 1; } else { $spacer=""; } echo "<h1><p><b>Job ID:</b>". $output['JobNo']; echo "<br /><b>Desc:</b> ". $output['Job_Desc']; echo "<br /><b>Print Date:</b> ". $output['Print_Date']; echo "<br /><b>Delivery Date:</b> ". $output['Delivery_Date']; ?> <a href="GetSingleJob.php?JobNumber=<?php echo $output['JobNo']; ?>">[View Job]</a> <?php $counter++; echo "</h1><hr /></p>"."".$spacer."";} mysql_close($conn); ?>
  14. Hi guys, well the topic says it all! I need to find a way of getting my resultset to line next to one anohter, then after say the 4th or 5th result, drop down a line and start again. Hope someone can help here, relevant code is below - $sql = "SELECT * FROM Jobs where Print_Complete=0 and Print_Date=CURDATE()"; $results=mysql_db_query($database_name,$sql,$conn); echo "<h2>Today's Jobs for "; echo(Date("l F d, Y</h2>")); while ($output=mysql_fetch_array($results)) { echo "<h1><p><b>Job ID:</b>". $output['JobNo']; echo "<br /><b>Desc:</b> ". $output['Job_Desc']; echo "<br /><b>Print Date:</b> ". $output['Print_Date']; echo "<br /><b>Delivery Date:</b> ". $output['Delivery_Date']; echo "<br />"; ?> <a href="GetSingleJob.php?JobNumber=<?php echo $output['JobNo']; ?>">[View Job]</a> <?php echo "</h1><hr /></p>";} mysql_close($conn); ?>
  15. I realise this is a php forum, but I have a simple question, if I have a landing page of index.html and then place a different page on the server called index.jsp (I cannot change the name of this) what would show first as the landing page?
  16. Thanks for this, I have put in what you suggested by using the array as above but when I pass the value to the post page it now says "Job No: Array " when it of course should say Job No: and then the specific number.......This is all pretty new to me php code and apologise for the time its taking for you guys to help me out here
  17. Yes that works fine, the number is there and is different for each job as is on the database!
  18. Ok, that last one worked so its not erroring anymore but its still has the original problem of passing through the last one one the list no matter which one I choose :'(
  19. Still giving me exacty the same error...this is driving me nuts, one of those things can spend days on and finally see its somethignstupid but am just not seeing it this week
  20. HI I tried this but this gives me an error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /homepages/19/d153224249/htdocs/SelectAllEBJobs.php on line 34
  21. ok well fair enough, how would you do this job then?? All it does is continuasly passes the last job number through not the one I need (unless I want the last one of course)
  22. Well its here, it isnt hidden yet but will be when I sort this out echo("<INPUT TYPE=\"text\" NAME=\"JobNumber\" VALUE= \"$JobNo\" id='JobNumber'>");
  23. Hi Guys, I am working on a job page that uses an sql query to get details of all today's jobs, this then places them all onto a page, then when I click the button under each individual job it passes that value from a (will be but not currently for bugging purposes) hidden text box and passes that value onto a new page to get all details for that particular job. The problem I am having is that when I click on a button, it automatically passes the last job through, no matter which job I click on (and I know the job no is in the text boxes as I can see them laid out correctly, this is driving me nuts, I have tried BOTH The post and get methods and a mixture of the two but it always does the same thing, continually passes through the last job number I will post the code below for the sending page and the receiving page. First page <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> </head> <body> <form action="GetSingleJob.php" name="GetJobDets" method="POST"> <?php $database_name=""; $database_password=""; $database_host=""; $Username=""; $conn = @mysql_connect($database_host, $Username, $database_password, $database_name) or die(mysql_error()); echo "<html><head><title>All Jobs</title></head><body>"; echo "<h1>All Jobs</h1>"; $sql = "SELECT * FROM Jobs where Print_Complete=0 and JobNo like '%EB%'"; $results=mysql_db_query($database_name,$sql,$conn); while ($output=mysql_fetch_array($results)) { $JobNo =$output[JobNo]; echo "<p><b>Job ID:</b> ". $output[JobNo]; echo "<br /><b>Desc:</b> ". $output[Job_Desc]; echo "<br /><b>Print Date:</b> ". $output[Print_Date]; echo "<br /><b>Delivery Date:</b> ". $output[Delivery_Date]; echo "<br />"; echo("<INPUT TYPE=\"text\" NAME=\"JobNumber\" VALUE= \"$JobNo\" id='JobNumber'>"); echo("<INPUT TYPE=\"submit\" NAME=\"ViewJob\" VALUE=\"View Job\">"); $JobNo=""; echo "<hr /></p>";} mysql_close($conn); ?> </form> <INPUT TYPE=BUTTON NAME='ViewTodaysJobs' VALUE='View Todays Jobs' onClick="window.location='selectatodaysjobs.php'"> <INPUT TYPE=BUTTON NAME='ViewALLJobs' VALUE='Refresh Jobs' onClick="window.location='selectalljobs.php'"> </body> </html> Receiving page <?php $database_name=""; $database_password=""; $database_host=""; $Username=""; $conn = @mysql_connect($database_host, $Username, $database_password, $database_name) or die(mysql_error()); $JobNo = $_POST['JobNumber']; //This receives the JobNo data from the hidden field on the previous page $sql = "SELECT * FROM Jobs where JobNo='$JobNo'"; $results=mysql_db_query($database_name,$sql,$conn); echo "<html><head><title>Job No: $JobNo</title></head><body>"; echo "<h1>Job No: $JobNo </h1>"; while ($output=mysql_fetch_array($results)) { $JobNo =$output[JobNo]; echo "<p><b>Job ID:</b> ". $output[JobNo]; echo "<br /><b>Date Added:</b> ". $output[Date_Added]; echo "<br /><b>Company Name:</b> ". $output[Company_Name]; echo "<br /><b>Desc:</b> ". $output[Job_Desc]; echo "<br /><b>Press:</b> ". $output[Press]; echo "<br /><b>Print Date:</b> ". $output[Print_Date]; echo "<br /><b>Delivery Date:</b> ". $output[Delivery_Date]; echo "<br />"; echo("<INPUT TYPE=text NAME='Job' VALUE= $JobNo>"); echo "<hr /></p>"; } mysql_close($conn); ?> <INPUT TYPE=BUTTON NAME='ViewALLJobs' VALUE='View ALL Jobs' onClick="window.location='selectalljobs.php'"> <INPUT TYPE=BUTTON NAME='ViewTodaysJobs' VALUE='Todays jobs' onClick="window.location='selectatodaysjobs.php'"> <INPUT TYPE=BUTTON NAME='Complete' VALUE='Job Complete' onClick="window.location='selectalljobs.php'"> </form> Many thanks guys a big gold star for anyone who can fix this for me
×
×
  • 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.