Jump to content

ayok

Members
  • Posts

    340
  • Joined

  • Last visited

    Never

Everything posted by ayok

  1. Hey, it works! I'm not sure where I've got the code from, but it suppose to tell me what's the error.. :-\ Thank you.. this site is super! cheers, ayok
  2. Could anybody give me a clue? Thanks
  3. Hi, Please let me tell you my problem with my php script. I want to show a table in a webpage. Here is the script for db connection: <? $db_link = mysql_connect("localhost", "root", ""); if (!$db_link) { die("Could not connect: " . mysql_error()); } mysql_select_db("shopping") or die("Could not select database"); ?> And this is my product list php: <?php echo "<H3 align=center>Product List</H3>"; include "dbconnect.php"; $tampil=mysql_query("SELECT * FROM products ORDER BY PkProduct DESC"); if($total=@mysql_num_rows($tampil)){ return $total; } else { print (mysql_error()); } $url="http://localhost/newstore/products"; echo "<table align=center border=1><tr> <th>Categories</th> <th>Product names</th> <th>Contents</th> <th>Prices</th> <th>Images</th></tr>"; while ($data=@mysql_fetch_array($tampil)) { echo"<td>$data[FkFamily]</td>"; echo"<td>$data[Name]</td>"; echo"<td>$data[Content]</td>"; echo"<td>$data[Price]</td>"; echo"<td><img src='$url/$data[image]'</td></tr>"; } ?> When I open my browser, I only see the title "Product List" and no table, nor error message. What's wrong with my script? How can I see the mistakes? Thank you, ayok
  4. Wow.. so fast.. Thank you ayok
  5. Hi there, I don't know how it's called, but I want to ask how to make a form which able us to make bold, quote, link or change font color by using [].. like in this forum. Thank you, ayok
  6. Hi, I tried to make a guestbook with php, but I got this problem. I can put my messages to database, but when I want to show my message i only got this message. Guest's comments Name: Array [name] E-mail: Array Messages: Array [message] I use this script to show the message. <?php echo "<H3>Guest's comments</H3>"; include "guestbook_connection.php"; $show=mysql_query("SELECT * FROM guest ORDER BY guest_number DESC"); while ($data=mysql_fetch_array($show)) { echo "Name: $data [name]<br>"; echo "E-mail: $data [email]<br>"; echo "Message: $data [messages]<br>"; } ?> Could anybody help me out? thanks ayok
  7. Hi.. another question from a newbie.. I have a newsletter, and I tested to send emails to my accounts in yahoo, gmail, hotmail, and my own server. The emails were sent successfuly, except... HOTMAIL.. When I just sent emails with text format, my hotmail account received it in the bulk/junk mails folder. After I changed the email format to html, it didn't receive it at all... How can I send php emails to hotmail? thx... ayoksus
  8. Thanks Redarrow, But I want the pic in the email. "print ("<img src='http://www.what_ever.com/image.gif'></img><br>" put my pic on the next page. And I still can't send to hotmail.. ayok
  9. Hi Greaser, I already solve the problem with the html email. To send the image, I just add it in the label of the text area. But now I have another issue.. I can't send the email to hotmail since I use the html email....
  10. Thanks Greaser! yes, $message_choice will be the body. The message will be filled in a news form, and sent directly without being saved to any database. I think that is my question, how can i include the picture into the $message_choice file? I got this script from a php tut, but they don't discuss about include the picture. Thx. ayoksus
  11. Hey thanx... Yes, I'd like to have a picture in the emails i sent to the subscribers. You know, like a letter with a header on the top of the letter, like logo.
  12. Is this a silly question? why can't i get any answer in any php forums? ??? ???
  13. Nobody can help? Or my english is too bad?
  14. Hi.. I'm a newbie here, also to PHP. NOw I have a question about php newsletter. I have a simple newsletter script which use .txt database.for the emails. Everything works fine. However, I want an image header on the mail body.. like logo. So everytime I send my newsletter, the image will appear on the top of the mail body. But I can't get it. Could anybody tell me how to do it? Here is part of the php script for the email. <?php include "config.php"; include "header.inc"; if(!($sendmail)){ ?> <form method="POST" action="<?php echo($PHP_SELF); ?>"> <h3>News </h3> <p>Select Mailing List:<br> <select size="1" name="list_choice"> <option selected>emails.txt</option> </select></p> <p>Title:<br> <input type="text" name="subject_choice" size="50"></p> <p>Message:<br> <textarea rows="6" name="message_choice" cols="42"></textarea></p> <p><input type="submit" value="Send Mail" name="sendmail"><input type="reset" value="Reset" name="B2"></p> </form> </UL> <?php } $header = "From: $from_mail; \n"; if ($sendmail == "Send Mail"){ print ("<H3>Sending news to emails...</H3><P>"); $file_handle = fopen($list_choice, "r") or die("Couldn't open mailing list.."); while (!feof($file_handle)) { set_time_limit(0); $address = fgets($file_handle, 1024); mail("$address", stripslashes($subject_choice), stripslashes($message_choice), $header); print ("Mail Sent To: $address<br>\n"); } print ("<H3>Done! The news is sent. Klik <A HREF='view.php'>Click here</A> to see the emails.</H3><BR>"); } include "footer.inc"; ?>
×
×
  • 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.