Jump to content

robert_gsfame

Members
  • Posts

    876
  • Joined

  • Last visited

Everything posted by robert_gsfame

  1. sorry wrong post, okay i can download it now in correct format, but then i cannot open it file:///C:/DOCUME~1/WINDOW~1/LOCALS~1 was typed on url can fix this? how to change the path??
  2. that's already valid mikesta, what's wrong with 'image/jpeg'??
  3. i want to download a file that is stored inside my upload folder i try this but it didn't work as file always in txt <?php header("Content-Disposition: attachment; filename='image.jpg'"); header("Content-length: 10000"); header("Content-type: jpg");?> which part is wrong??
  4. I used to do upload file and now i'm trying to download the file from the upload folder...can anyone tell me how to do it. Let say i have folder called "upload" and there is an image called "image.jpg" then how to create a link to download the image.jpg <a href="upload/image.jpg">Download file</a> This is wrong!, can anyone help me
  5. sorry should be $count=substr_count($message1,"\n"); ;D ;D
  6. It's easy to count string length in textarea as we can use strlen $message=$_POST['message']; $length=strlen($message); ---------> to count total string But if i want to count total <br> in textarea, can i do that?? $message1=$_POST['message']; $count=substr_count($message1,'<br>') i dont think it would be correct thanks
  7. If you never try it, then it seems to be fine but once you try it then you will find that there must be something wrong with the loop as second email always appear !!!!! eg: 123-Australia email@yahoo.com 456-Brazil email@gmail.com If there is a record then no problem with it, but when there is no record let say email@gmail.com never choose Brazil during registration n this will show up 123-Australia email@yahoo.com email@gmail.com --------------> I WANT TO KICK THIS STUPID OUT
  8. REALLY GETTING CRAZY WITH THIS STUPID LOOP!!!!
  9. Still don't get it, could anyone come up with my code that have been modified???
  10. yes i know, but then where should i place that query as i have to loop it to get users' email?
  11. which one mikesta?? cannot find it myself :'(
  12. LOOP PROBLEM! As it still gives me $email although there is no records Can anyone help me by giving the code??
  13. Not solving the problem yet mikesta, i try to change mail() function with echo $email to see whether $email will be executed or not and yet echo $email still appear when no records was found Something wrong with the loop, and i still cannot find which part!!
  14. I have to loop the email and the only problem is i don't want the email to appear if no records found Please help me in solving this code! which part is wrong and where it should be placed??
  15. I wish to tell all members about ticket that is available. When registered, members are given an option to choose which destination (country) information they wish to get. If they chose more than one country then all will be stored into my database with xx,yy,zz format eg: Brazil, United States, Mexico <?php require_once('config.php'); $query1="SELECT * FROM ticket"; $sql=mysql_query("SELECT * FROM passenger LIMIT 2 OFFSET 0 "); while($array1=mysql_fetch_assoc($sql)){ $subscountry1=$array1['subs_country']; $subscountry2= explode(",", $subscountry1); for($i = 0; $i < count($subscountry2); $i++){ $subscountry[$i] = $subscountry2[$i]; $query_action1=mysql_query($query1); $num1=mysql_num_rows($query_action1); if(!empty($num1)){ while($array=mysql_fetch_assoc($query_action1)){ $id=$array['id']; $registration=$array['reg_no']; $country=$array['country']; $email=$array1['email']; if($subscountry[$i]==$country){ echo $id." ".$registration." ".$country." "; }}}} mail($email,"xxxxxx","xxxxxx","xxxxxx")."<br>"; } ?> This will result : All registration number and country will appeared together with user email which is used for mail() But the problem is that $email still appear (which means that mail() will be still executed) although no records was found Can anyone help me arrange this code, they must be wrongly looped thanks
  16. i have some logical question, I have member records (100 people) and they are coming from various countries (10 country), i have 25 newsletters made for 10 countries. therefore one country can have more than 1 newsletter Let say newsletter only given in a small link so i can use <td>$newsletter</td> My question is which one should i loop first the newsletter or country. I would be appreciate if anyone could attach some of the code to solve this problem I really confused with this thanks.
  17. Is it possible to give a limitation (LINE) on textarea for eg: User can only create a paragraph or text within 10 line not more Can i do that?? thx
  18. okay i got it, simple mistake but create a great and confusing problems <form name="form1" method="post" action="<?php echo $_SERVER['php_self'];?>"> should be <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post" name="form1"> Finally, thx Jamesxsg1
  19. Jamesxsg1, , when i submit by pressing button it parse the value on url so i can only use $_GET to get the value although i have put "post" as a method. What is actually wrong with this???
  20. sorry what is written is incomplete.. i actually have added the value into each radiobutton, but still not working!
  21. <?php session_start(); ?> <?php require_once('configuration.php'); if(isset($_POST['button'])){ $checked=$_POST['check'];} ?> <html> <head> </head> <body> <form name="form1" method="post" action="<?php echo $_SERVER['php_self'];?>"> <input type="radio" name="check">Check <input type="radio" name="check">Check2 <input type="submit" name="button"> </form> </body> </html> I cant get the result from the bold part after echo, what is wrong???
  22. I have automatic generate email, through that email user is being asked to choose either "yes" or "no" and i want any option that has been chosen to be sent to my webmail (mywebmail@web.com) my question is if i put this <a href=mailto:mywebmail@web.com?subject=YES>yes</a> or <a href=mailto:mywebmail@web.com?subject=NO>no</a> This means that user still has to click on send button from their own email, i wish to have it sent once "yes" or "no" link is being clicked by user Can i do that??? thx
  23. okay i got it, i forgot to loop it
  24. yes i know using IN, but how do i retrieve the data from database using mysql_fetch_array??
×
×
  • 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.