Jump to content

frozenlight777

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

frozenlight777's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. wow.. works great... thanks!
  2. I have 2 arrays that i need to loop through at the same time. Each array has the same number of values. I'm thinking of something like this.... while (list(, $value , $value2) = each($_POST['Asset_Tag'], $_POST['Service_Tag'])) { echo "Value: $value : $value2 <br />\n"; } exit; 2 loops works fine but i need it in 1... is it possible?
  3. nevermind i got it. foreach($_POST['Asset_Tag'] as $key => $value){ $Asset_Tag = $_POST['Asset_Tag'][$value]; print $Asset_Tag; echo "<br/>"; } thanks for you're help tho. you certainly got this working for me.
  4. Great... thanks for you help i got the array working so now how would i go about looping the data like i did in the first table.. something like <?php foreach(????????] as ????){ echo "<td>$_POST['Asset_Tag']</td>"; echo "<td>$_POST['Type']</td>"; echo "<td>$_POST['Service_Tag']</td>"; echo "<td>$_POST['User']</td>"; } ?> not sure what the looping variables would be...
  5. wow I apologize.... i used request instead of post.... been a long day... it displayed the whole array now...
  6. upload.php <?php error_reporting(E_ALL); require_once( "include.php" ); XMLParse(); ?> <html> <form method="REQUEST" action="uploadlist.php"> <table align="center" border="1" width="600"> <tr> <th>Asset Tag</th> <th>Type</th> <th>Service Tag</th> <th>User</th> </tr> <?php foreach( $data as $row ) { ?> <tr> <td><input type="text" name="Asset_Tag[<?php echo $row['Asset_Tag']; ?>]" value="<?php echo $row['Asset_Tag']; ?>"/></td> <td><input type="text" name="Type[<?php echo $row['Type']; ?>]" value="<?php echo $row['Type']; ?>"/></td> <td><input type="text" name="Service_Tag[<?php echo $row['Service_Tag']; ?>]" value="<?php echo $row['Service_Tag']; ?>"/></td> <td><input type="text" name="User[<?php echo $row['User']; ?>]" value="<?php echo $row['User']; ?>"/></td> </tr> <?php } ?> <td><input type="submit" value="Send to Database"/></td> </table> </form> </html> and then the uploadlist.php file... which isn't anything yet except for <?php print_r($_POST); ?>
  7. all it displays is: Array() with all the content in the URL
  8. i'm sorry to be a pain but each array is independent from eachother. What you posted seemed to work but it only displayed in the URL.
  9. interesting.... now how would i display that on the other page...something like $_POST("Asset_Tag"); ?
  10. I'm looping through an array with an xml file and it displays great...... <form method="POST" action="uploadlist.php"> <table align="center" border="1" width="600"> <tr> <th>Asset Tag</th> <th>Type</th> <th>Service Tag</th> <th>User</th> </tr> <?php foreach( $data as $row ) { ?> <tr> <td><input name="Asset_Tag" value = "<?php echo( $row['Asset_Tag']); ?> "/></td> <td><input name="Type" value = "<?php echo( $row['Type']); ?> "/></td> <td><input type="hidden" name="Service_Tag" value = "<?php echo( $row['Service_Tag']); ?>"/></td> <td><input name="User" value = "<?php echo($row['User']); ?> "/></td> <td><input type="hidden" name="_submit_check" value="1"/> </td> </tr> <?php } ?> <td><input type="submit" value="Send to Database"/></td> </table> </form> however, how can I display the same results in the uploadlist.php file... I can't seem to get the array to display with the POST variables..... and I have no idea what other way there is..... ideas?
  11. that's kind of what I want, however, how would I get the text box to appear when the 3rd item of the list box is clicked?
  12. I'm fairly new to PHP and was wondering how to generate a calender from a list box when it's clicked. for example i have the following code... <form name="form1" method="post" action=""> <span> Search By: </span> <select size=1 name=list> <option value="fname">First Name</option> <option value="lname">Last Name</option> <option value="drange">Date Range</option> </select> <span class="style4">Enter Name</span> <input name="q" type="text" id="q" value="<?php echo $q; ?>"> <input type="submit" name="Submit" value="Look Up Hours"> </form> I want to make a calender or two appear when the "Date Range" item is clicked in the list box. Not quite sure how.
×
×
  • 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.