Jump to content

websponge

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

websponge's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok, noted, will make sure I do this, but can anyone help please?
  2. I tried to edit it! sorry.. stupid IE9! well its supposed to display all the fields, but it doesnt. I select an app from the dropdown list, for example "payroll" and I want the query to execute so it displays all the fileds for that record. the php for listing all the fields looks like this: $query="select * from ofcom where appname='Payroll'"; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { echo "<div id='recordholder'>"; echo "<div id='database-heading'>". $row['appname'] . "</div>"."<div id='description'>" . $row['description'] . "</div>"; echo "<div id='opcatholder'><div id='opcatheader'>Operational Cataogories</div><div id='opcat'><span class='op'>OP CAT 1 - </span>".$row['opcat1'] ."</div><div id='opcat'> <span class='op'>OP CAT 2 - </span>".$row['opcat2'] ."</div><div id='opcat'><span class='op'>OP CAT 3 - </span>".$row['opcat3'] ."</div></div>"; /*echo "<div id='routingheader'>Routing Information</div>";*/ echo"<div id='info'>".$row['info']."</div>"; echo "<div id='opcatholder'><div id='opcatheader'>Routing</div>".$row['routing']."</div>"; echo "</div>"; echo "<br clear='all' />"; } as you can see, ive manually set it too Payroll so that it works.. I want the listbox to execute the query when I select the app.. really hard to explain and ive been on this all day thanks for replying
  3. well its supposed to display all the fields, but it doesnt. I select an app from the dropdown list, for example "payroll" and I want the query to execute so it displays all the fileds for that record. the php for listing all the fields looks like this: $query="select * from ofcom where appname='Payroll'"; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { echo "<div id='recordholder'>"; echo "<div id='database-heading'>". $row['appname'] . "</div>"."<div id='description'>" . $row['description'] . "</div>"; echo "<div id='opcatholder'><div id='opcatheader'>Operational Cataogories</div><div id='opcat'><span class='op'>OP CAT 1 - </span>".$row['opcat1'] ."</div><div id='opcat'> <span class='op'>OP CAT 2 - </span>".$row['opcat2'] ."</div><div id='opcat'><span class='op'>OP CAT 3 - </span>".$row['opcat3'] ."</div></div>"; /*echo "<div id='routingheader'>Routing Information</div>";*/ echo"<div id='info'>".$row['info']."</div>"; echo "<div id='opcatholder'><div id='opcatheader'>Routing</div>".$row['routing']."</div>"; echo "</div>"; echo "<br clear='all' />"; } as you can see, ive manually set it too Payroll so that it works.. I want the listbox to execute the query when I select the app.. really hard to explain and ive been on this all day thanks for replying
  4. Hi, Im starting to write a simple (so I thought! ) project at work, I have no problems with the HTML, CSS or even the php mysql setup, but I am struggling with a simple piece of code! I have a list box, that populates from a table column using the following code: <?php function select(){ $query="SELECT appname FROM kpe_apps"; $result = mysql_query($query); echo '<select name="item" onchange="this.form.submit()">'; while($nt=mysql_fetch_array($result)){ echo '<option value="' . $nt['id'] . '">' . $nt['appname'] . '</option>'; } echo '</select>'; } ?> I then called the function on the page I needed. which works fine, now all I need is whatever is selected in the listbox other columns in the same table relating to the selected item are seen. I just cant seem to do it, loads of people are using jquery and other code, surely this can be done in php? any help would really be appreciated.. Many Thanks MOD EDIT: code tags fixed, linefeeds and indenting added.
  5. Awesome! thankyou very much.. I get it!
  6. right! ive never seen the "implode" command, this makes sense, thankyou, how would I get the emails into an array? I dont want to type them all out..?
  7. Im just a bit stuck on what the code should be, I can select all emails from the member table, but dont know how to send an email to all of them? Thanks
  8. thanks, I can get all the email address to display, like the link you gave, thats not the problem, I need to do what you said, and send one email to all recipients with BCC but I dont know how.. thanks again
  9. Hi, Im getting better at this php lark! ok so now I have a signup website page, all details get added to the database including an email address, all works fine. now I would like a page, with a simple text box, that when you hit submit, it send the contents of the text box to all email address` in the members table, a really really simple newsletter so to speak. Its purely for my learning curve and Ill set up recapacha on it anyway. but Im getting a bit lost in the code, could someone guide me please? I can grab the contents of the text box like this: $letter = $_POST['letter]; but how do I send to all recipients? $recipient = ("SELECT email FROM members"); thanks
  10. The best way to do this is to use the existing phpbb template system and design the rest of your website pages to use it, you can include the overall _header and footer files in your web pages, there are many articles on this on the phpbb website.
  11. It now works with the above code, many thanks all, especially zanus
  12. if($_POST['action'] == "demotivate") { upload("demotivate"); } else if($_POST['action'] == "nsfw") { upload("nsfw"); } else if($_POST['action'] == "fail") { upload("fail"); } ?>
  13. You define the directory name when you call the function.. For instance nsfw("someDirectory"); I put that in the function call, it doesnt work can you help?
×
×
  • 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.