Jump to content


New Members
  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

shabbaranks's Achievements


Newbie (1/5)



  1. Fixed - I think I had the comma's and the quotes incorrectly placed.
  2. Ah ok - Im not too sure whats going on here but I had it working. Re started the server and now its not displaying again the code I now have is <td>Name</td> <td> <input type="text" input name="contactname" disabled="true" id="contactname" class="secondary-bfe-inputs" value='.$current_user->display_name.' /></td> if I change the type="text" to type='text' the page doesnt work. Also my <?php tags are at the start and the end of the page hence why they arent in the above code. Thanks
  3. Hi all, Im currently modifying some example code for a form which a user submits. Initially the form asked the user to input thier username but I have managed to get it so that the username is populated from the current user login. What I am struggling to do is understand how the $post works. Am I correct in thinking that <tr> <td> Name</td> <td input name="contactname" id="contactname" class"secondary-bfe-inputs" value=>'$current_user->display_name.'</td> </tr> is holding the value of $current_user->display_name. and where I use '.$_POST['contactname'].' will show the value? If not could you explain what I should be doing please? Thanks
  4. Thank you so much Webstyles... I was hoping that I was onto the right track. Once Ive grabbed the selection (an also is it possible to grab more than one selection at a time?) how then do I parse it onto a perticular field? This just isnt sinking in
  5. Just trying to get onto the chat/help channel but its not connecting - is there a problem? Thanks
  6. Hi, I've been google'ing until Im blue in the face and think I have found a solution as to what I want to do, but I cant get how I achieve it. Would I be correct in thinking to get the selected value from below <select name="Activity"> <?php $sql = "SELECT Status FROM Activity"; $rs = mysql_query($sql) or trigger_error(mysql_error() . " unable to run query."); echo "<option></option>"; while($row = mysql_fetch_assoc($rs)) { echo "<option value=\"".$row['Activity']."\">".$row['Status']."</option>\n "; } ?> </select> The array I need is "Activity"? Do I then use javascript getelementbyid? This being the 'Activity' field how do I then push this to the Activity location in the below table? If Im doing this completely wrong would someone be so kind as to point me in the right direction please? <button onclick='addRow();'>Add to Table</button> <script type='text/javascript'> function addRow(){ //get a reference to the table tbody var myTable = document.getElementById('myTable').getElementsByTagName('TBODY')[0]; //create the table row var tr = document.createElement('TR'); //create the 4 column cells var td1 = document.createElement('TD'); td1.innerHTML = '<input class="name" />'; var td2 = document.createElement('TD'); td2.innerHTML = '<input class="date" />'; var td3 = document.createElement('TD'); td3.innerHTML = '<input class="name" />'; var td4 = document.createElement('TD'); td4.innerHTML = '<input class="hours" />'; var td5 = document.createElement('TD'); td5.innerHTML = '<input class="name" />'; var td6 = document.createElement('TD'); td6.innerHTML = '<input class="name" />'; var td7 = document.createElement('TD'); td7.innerHTML = '<input class="description" />'; //add the column cells to the row tr.appendChild(td1); tr.appendChild(td2); tr.appendChild(td3); tr.appendChild(td4); tr.appendChild(td5); tr.appendChild(td6); tr.appendChild(td7); //append the row to the table myTable.appendChild(tr); } </script> <table id='myTable'> <thead> <tr> <td>Name</td> <td>Date</td> <td>Project</td> <td>Hours</td> <td>Department</td> <td>Activity</td> <td>Description</td> </tr> </thead> <tbody> </tbody> </table> Thanks
  • 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.