Jump to content

knightsjoker

New Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

knightsjoker's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I got it. I had to rewrite the table view using for loop and do the counting since the form is dynamic. and so the table view will be like: echo "<tr><td>" .$row['id']. "</td><td>" .$row['name']. "<input type='hidden' name='varname[" .$j. "][" .$i. "]' value='" .$row['name']. "'></td><td><select name='quantity[" .$j. "][" .$i. "]'><option value ='0' selected='selected'>0</option><option value ='1'>1</option><option value ='2'>2</option><option value ='3'>3</option></td></tr>"; $i++; then you do the usual array retrieval and to spew it back out... for($j=1; $j<=count($itemname); $j++) { for ($i=0; $i<count($itemname[$j]); $i++) { $getvalues1 = $itemname[$j][$i]; $getvalues2 = $itemquantity[$j][$i]; echo "<li>"; echo "<input type='text' name='itemname' value='" .$getvalues1. "' readonly='readonly'>"; echo "</li>"; echo "<li>"; echo "<input type='text' name='itemquantity' value='" .$getvalues2. "' readonly='readonly'>"; } }
  2. Hi guys, Was wondering if anyone can help me with this. Here's what I'm trying to do: I've retrieved values from table a from mysql and post them on a form. echo "<tr><td>" .$row['id']. "</td><td>" .$row['name']. "<input type='hidden' name=name[] value=" .$row['name']. "></td><td><select name='item[]'><option value ='' selected='selected'>Please Select</option><option value ='1'>1</option><option value ='2'>2</option><option value ='3'>3</option></td></tr>"; and now i'm trying to display these information one more time on a different page. So I did the usual retrieval $name = $_POST['name']; $item = $_POST['item']; Then I'm using foreach loop to retrieve the item values. foreach ($item as $getitem => $value) { echo "<tr><td>"; echo $value; echo "</td></tr>"; } Here is where I'm stumped. What's the best way to associate the name to the item. while loop? Thanks for the help.
  3. Hi guys, I'm stump on how to do this. Basically I'm trying to update 1 table by comparing values from different tables. here's how i set it up: $query = "SELECT booking_event.starting_date_time, booking_schedule.schedule_date_time ". "FROM booking_event, booking_schedule ". "WHERE booking_event.starting_date_time = booking_schedule.schedule_date_time"; with that part set... i want to update a different field which is event_id_location_# (there are 20 locations) I want to update just certain location according to the schedule_date_time so let's say location 1 has a value of 1 (occupied) I want to update it to 0 (not occupied) how do I go about doing this? I already passed the hidden value of location (is it correct?): <a href=\"delete.php?id={$row[id]}&passlocation={$getlocation}\">Delete</a>"; ?> I was thinking of if function. while($row = mysql_fetch_array($query)) { if (location == loc1) { $query2="UPDATE booking_schedule SET event_id_location_1 = '0'"; } } thanks guys
  4. Hi guys, Was wondering if it's possible to set up a cron job to randomly change flash header every week. So i'm thinking of changing the include header1.php Thanks. CJ
  5. Hi guys, need a suggestion. i'm trying to setup a web based email system. currently everyone in the office is using outlook so I want to centralized the address book by converting to using web based email. Right now the email server is handled by the web hoster. I was wondering if squirrelmail will let me setup to access emails from outside server. or any other web-based email package that you can recommend? I need the global address book within that email package. Thanks CJ
×
×
  • 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.