Jump to content

gnawz

Members
  • Posts

    237
  • Joined

  • Last visited

Everything posted by gnawz

  1. Yes, sth like that. But I can't use $link, before I pass it.... U know the drop down comes after the MySQL code
  2. I 'm not sure i explained well The page would be going to the Link read from the database.... Db has 3 fields id, Name, Link (this is a hyperlink) <select name = "sltStation"> <option value="0">Select Station</option> <? $sql = "SELECT * FROM stations ORDER BY Name ASC"; $result = dbQuery($sql); if(dbNumRows($result)) { while($row = dbFetchAssoc($result)) { echo "<option>$row[Name]</option>";///what I dipslay for the user to select } } else { echo "<option>No Stations present</option>"; } ?> the dynamic drop down menu selects all fileds but in <option value, I dipslay Name. I want when the user selects, a value in the dropdwon, it opens the assocaited Link
  3. Hi. I have a dynamic drop down that reads fields from the database. I want a page to be opened in a new tab/window (target = _blank) when a user clicks on an item in the drop down. How do I achieve that in PHP+Javascript? My drop down <select name = "sltStation"> <option value="0">Select Station</option> <? $sql = "SELECT * FROM stations ORDER BY Name ASC"; $result = dbQuery($sql); if(dbNumRows($result)) { while($row = dbFetchAssoc($result)) { echo "<option>$row[Name]</option>"; } } else { echo "<option>No Stations present</option>"; } ?> the data base consists two fields: id, Name and Link (a hyperlink) I display Name in the drop down and require that onChange, it opens the associated link in a new page ie Click on name, open associated link I hope I'm clear
  4. gnawz

    Table aligns.

    Use What i gave you to align some text top and others bottom
  5. gnawz

    Table aligns.

    Check valign properties or use align = absbottom/ abstop, etc Hope it helps
  6. I see. Why don't you use PHP/MySQL date functions as opposed to drop downs? You can also use date pickers to make it easier. Google date pickers, you will find some. Otherwise Do something like: $year = $_POST['year']; $month = $_POST['month']; $day = $_POST['day']; Then a new variable for concatenation $reminderdate = $year.$month.$day; $reminderdate is what you save in the DB
  7. Probably your copy is corrupted. Download another one. Make sure all is well too in the server as regards folder placement
  8. Anyone knows/has used a news letter script that is easy to install and incorporate in a website?
  9. I still don't get you.. What do you mean set the date, month and year in one field?
  10. I am sending a test email to a gmail account which receives all sorts of emails, including those with images. I doesn't seem to display the formatting even after I put my header function with text/html
  11. The problem is that the email loses its formatting.....ie bold, italics, etc Also images posted are not displayed in the email.
  12. Hi. I have a php email script that sends newsletters to email addresses stored in my db. However, In my email panel, there is an HTML editor so I can do some HTML formatting like bold/italic, etc My problem is users receive emails with text mixed with HTML formatting... things like <span> <br> <em> included in the text. How do I make sure I send only the text without it losing its formatting? Below is my email sending function function sendNL() { $adminmail = "admin@localhost.com"; $path = "localhost"; if(isset($_POST['submit'])) $nletter = $_POST['txtTitle']; $subject = $_POST['txaDescription']; //the block above formats the letter so it will send correctly. $sql="SELECT * from mogas_newsletter order by email ASC"; //select e-mails in ABC order $result=mysql_query($sql) or die("Could not get list"); while($row=mysql_fetch_array($result)) { $headers = "From: $adminmail \r\n"; $headers.= "Content-Type: text/html; charset=ISO-8859-1 "; //send HTML enabled mail $headers .= "MIME-Version: 1.0 "; mail("$row[email]","$subject","$nletter",$headers); } print "Newsletter Sent."; echo "<META HTTP-EQUIV=\"refresh\" content=\"; URL=index.php\"> "; }
  13. HTML filter seems not to be tackling this problem. I am already sending email as multipart.
  14. gnawz

    Form Help

    herghost, Actually <br> is pretty good.
  15. Hi. Somebody guide me on how to echo back data without HTML formatting. I have a newsletter script that works well, ie it sends the info to the signed-up emails but displays the text data with things like <br>, <span>, &nbsp, etc How can I make sure the data sent does not display the HTML formatting?
  16. gnawz

    Form Help

    Now I think yo might have to use the \n tag else... create a table with one column and multiple rows to display your results. echo each variable you want to display in the rows
  17. gnawz

    Form Help

    Something like: echo '<br><h5>These are your results</h5></br>';//showing featured listings echo '<table border=1 table width="980" align="center">'; echo "<tr>"; $count = 5;//rows $l = 0; for($i=0;$i<mysql_num_fields($listing);$i++) { echo "<th>"; echo mysql_field_name($listing, $i); echo "</th>"; } while($l < $count) { $row=mysql_fetch_row($listing); echo "<tr>"; for($j=0;$j<$i;$j++) { echo "<td>"; echo $row[$j]; echo "</td>"; } echo "</tr>"; $l++; } echo "</tr>"; echo "</table>"; ////////OR echo '<table border = "1" bordercolor="#000000">'; echo '<tr>'; //displaying the headings echo '</tr>'; echo '<tr>'; echo '<td width="20" height="20">'; echo '<b>Fld1</b>'; echo '</td>'; echo '<td width="20" height="20">'; echo '<b>Fld2</b>'; echo '</td>'; echo '<td width="20" height="20">'; echo '<b>Fld3</b>'; echo '</td>'; echo '<td width="20" height="20">'; echo '<b>Fld4</b>'; echo '</td>'; echo '<td width="20" height="20">'; echo '<b>Fld5</b>'; echo '</td>'; echo '<td width="20" height="20">'; echo '<b>Fld6</b>'; echo '</td>'; echo '</tr>'; //getting the database fields while($row = mysql_fetch_array($query)) { echo '<tr>'; echo '<td>'; $name = $row["Fld1"]; echo $name. "<br>"; echo '</td>'; echo '<td>'; $add = $row["Fld2"]; echo $add. "<br>"; echo '</td>'; echo '<td>'; $email = $row["Fld3"]; echo $email. "<br>"; echo '</td>'; echo '<td>'; $web = $row["Fld4"]; echo ('<b><a href="'.$web.'">'.$web.'</a></b>'); echo '</td>'; echo '<td>'; $tel = $row["Fld5"]; echo $tel. "<br>"; echo '</td>'; echo '<td>'; $loca = $row["Fld6"]; echo $loca. "<br>"; echo '</td>'; echo '<td>'; } echo '</table><br/>'; } Hope it helps....
  18. I'm not sure I understand you. But for include, Just use ../.../yourfile.php use ../ to depict a folder location
  19. gnawz

    Form Help

    Nope. You must be doing something wrong. Show your code A table in a loop would come in handy
  20. very clear. What are you working on? You could automatically change month depending on no of days eg feb 28/29....30/31
  21. You can build an array of anything.
  22. lol That depends on the javascript version and settings in JS 1.1 gor exaple, you can't just use alert...there must be window.alert
  23. gnawz

    Form Help

    Simply add /n to your echo. otherwise the tabular way can achieve it very well too <? echo $myrow['albumname']; echo "\n"; echo $myrow['tracks']; echo "\n"; ?>
  24. gnawz

    Form Help

    I guess that is what herghost is looking for
×
×
  • 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.