5 Replies - 309 Views - Last Post: 10 March 2014 - 02:36 PM Rate Topic: -----

#1 rodneyqc  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 134
  • Joined: 02-August 13

Missing Code?

Posted 09 March 2014 - 11:05 AM

Hello I'm Rodney and i have some problems regarding with the code below. Because i know that i use php for loop methods arrays etc to output a certain information. But few days i checked this file/code i dont know how it became pure html and the php coding is gone and it runs properly but when i want to configure it even i delete the code below starting to <form>, even when i run it, the output is still there which should be gone because i deleted the code. Sorry for my english. Hope you can help me out here. thanks :)

<div id="fromTo_container">
			<div id="trip_container">

			<form action  ="admin_insert_trip.php" method="post"> 
				<select size="8" id="select_from" name="from">  
					<option selected="" disabled="" id="select-disable">FROM</option> 
					<?php
						require_once "functions/database2.php";
						$db = new Database2('localhost','root','','capstone'); 
						$db->query("SELECT * FROM trips");
					?>
								<?php
								if($db->numRows() == 0){
									echo 'No Schedules';
								} else { 
								foreach($db->rows() as $holder) {
					?>
								<option value="<?php echo $holder['trip_place']?>"> <?php echo $holder['trip_place']?> </option>
							<?php
							}
						}
					$db->disconnect();
					?>
				</select> 

				<select size="8" id="select_to" name="to">  
					<option selected="" disabled="" id="select-disable">TO</option> 
					<?php
						require_once "functions/database2.php";
						$db = new Database2('localhost','root','','capstone'); 
						$db->query("SELECT * FROM trips");
					?>
								<?php
								if($db->numRows() == 0){
									echo 'No Schedules';
								} else { 
								foreach($db->rows() as $holder) {
					?>
								<option value="<?php echo $holder['trip_place']?>"> <?php echo $holder['trip_place']?> </option>
							<?php
							}
						}
					$db->disconnect();
					?>
				</select>								
				<br><br>Date:
					<select id    ="month" name="month">
						<option class ="text3" style="text-decoration:line-through">Month</option>
						<option class ="text3" value="Jan">Jan</option>
						<option class="text3" value="Feb">Feb</option>
						<option class="text3" value="Mar">Mar</option>
						<option class="text3" value="Apr">Apr</option>
						<option class="text3" value="May">May</option>
						<option class="text3" value="Jun">Jun</option>
						<option class="text3" value="Jul">Jul</option>
						<option class="text3" value="Aug">Aug</option>
						<option class="text3" value="Sep">Sep</option>
						<option class="text3" value="Oct">Oct</option>
						<option class="text3" value="Nov">Nov</option>
						<option class="text3" value="Dec">Dec</option>									
					</select>
					<br>
					Time:
					<select id    ="time" name="time" class="time">
						<option class ="text3" style="text-decoration:line-through">Time</option>
						<option value ="01:00">01:00</option>
						<option value ="02:00">02:00</option>
						<option value ="03:00">03:00</option>
						<option value ="04:00">04:00</option>
						<option value ="05:00">05:00</option>
						<option value ="06:00">06:00</option>
						<option value ="07:00">07:00</option>
						<option value ="08:00">08:00</option>
						<option value ="09:00">09:00</option>
						<option value ="10:00">10:00</option>
						<option value ="11:00">11:00</option>
						<option value ="12:00">12:00</option>
					</select>
												
					<select id    ="time" name="ampm" class="time">
						<option class ="text3" style="text-decoration:line-through">am/pm</option>
						<option value ="am">am</option>
						<option value ="pm">pm</option>
					</select>
												
						<br><br>
					<input type   ="text" name="amount" class="trip_textbox" placeholder="Amount">
												
					<input type   ="text" name="tracking_id" class="trip_textbox" placeholder="Tracking ID">	
												
					<input type   ="text" name="busNumber" class="trip_textbox" placeholder="Bus Number">	
					Bus Type:
					<select id    ="time" name="busType" class="busType">
						<option class ="text3" style="text-decoration:line-through">Bus Type</option>
						<option value ="1">Regular</option>
						<option value ="2">Deluxe</option>
					</select>
												
					<input type   ="submit" id="trip_submit" value="Insert">
												
			</form>
             </div>
</div>



by the way its an old code just ignore the depricated mysql query.

Is This A Good Question/Topic? 0
  • +

Replies To: Missing Code?

#2 Ntwiles  Icon User is offline

  • D.I.C Addict

Reputation: 148
  • View blog
  • Posts: 830
  • Joined: 26-May 10

Re: Missing Code?

Posted 09 March 2014 - 11:10 AM

Do you have this on a live site that you can link to?
Was This Post Helpful? 0
  • +
  • -

#3 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 673
  • View blog
  • Posts: 2,970
  • Joined: 03-December 12

Re: Missing Code?

Posted 09 March 2014 - 11:32 AM

Comment everything out, echo a message and see if the message displays.
Was This Post Helpful? 0
  • +
  • -

#4 rodneyqc  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 134
  • Joined: 02-August 13

Re: Missing Code?

Posted 09 March 2014 - 12:05 PM

View Postastonecipher, on 09 March 2014 - 11:32 AM, said:

Comment everything out, echo a message and see if the message displays.


Hello I have already commented all the codes that i have posted above, but i still got an output.. :/

Uhmm wait, forgot. Ive tried commenting out from form tags open - close and still it displays. but when i comment from div - div, it doesnt display. what do you think could be the problem. i already tried changing the div id's etc
Was This Post Helpful? 0
  • +
  • -

#5 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 673
  • View blog
  • Posts: 2,970
  • Joined: 03-December 12

Re: Missing Code?

Posted 09 March 2014 - 04:32 PM

What do you mean by, configure it? Is this on a live or development site?
Was This Post Helpful? 0
  • +
  • -

#6 rodneyqc  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 134
  • Joined: 02-August 13

Re: Missing Code?

Posted 10 March 2014 - 02:36 PM

Hello, thank you for the time to answer my questions, unfortunately i just remade the module, after few hours i have made it. Thank you Guys
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1