-
Posts
393 -
Joined
-
Last visited
Everything posted by npsari
-
Hi there, I have table called Info. There are two main colombs (Name, News) I try display each distinct Name and his latest News: $q = "SELECT DISTINCT Name FROM info ORDER BY Date ASC, Time ASC LIMIT 10;"; $res = @mysql_query($q); while($r = @mysql_fetch_array($res)) { print "$r[Name]"; print "$r[News]"; } But the "News" dont show in Results! I want the latest News of a Distinct Name to show too What should i add to mySQL code guys
-
[SOLVED] Retreive data from mySQL databse relatevly simple question!
npsari replied to npsari's topic in PHP Coding Help
Thanks guys -
Hey, thanks is it the one called... include path
-
I am sorry, I dont understand what you mean So, does that mean, I simply create any folder, and put all the phpmailer files inside it And put the script on the same file And then I call it require("class.phpmailer.php");
-
I am installing the php-mailer The installation Guide says: Copy class.phpmailer.php into your php.ini include_path What is the php.ini include_path? I use Cpanel by the way I cant find it Can someone help...
-
Hi there I have a databse called phpb1 (The forums- obviously!) I use the below simple code to retreive posts: mysql_select_db(npsari_phpb1); $q = "SELECT * FROM phpbb_posts_text ORDER BY ???? DESC LIMIT 100;"; $res = @mysql_query($q); But I want to arrange posts by Time The Time is stored in another Table How can I connect between two tables? How can I say, sort by Date (which is in another table called post phpbb_posts)
-
Why the mail () function does not deliver emails???
npsari replied to npsari's topic in PHP Coding Help
Thanks for the info I will work on it -
This is a huge step You need to shrink your question a little Get the code, and we give you hints cus image upload needs too many thinking but yet again, it is easy
-
I dont know where on the net, but I can tell you an idea Each user has a unique Name You create a databse with 5 colombs Friend 1, 2, 3 etc... Then everytime someone ads a user, you use the edit function to insert the user name Adn you display names using the retreive code There is too much coding behind it This is the only way it can be explained
-
Why the mail () function does not deliver emails???
npsari replied to npsari's topic in PHP Coding Help
no, i am not using Free hosting actually ohh, how can I see if the SMTP is disabled -
I am using the below normal mail function <?php $to = "someone@hotmail.com"; $email = "someone@yahoo.com"; $subject = "This is a new message"; $message = "Hi there, this message should arrive"; mail($to, $subject, $message, "From: $email"); echo "The email has been sent."; ?> But the emails never reach Nothing arrives to destination Only few times it does What do famous sites use to deliver their emails They cant be using this one Does anyone know why this is happening
-
Posted: Wed May 02, 2007 10:19 pm Post subject: Instant Text copy button -------------------------------------------------------------------------------- The below script allows text copy in a click of a button: Try it out, it is nice actually <script type="text/javascript"> function cmdA(el) { with(el){ focus(); select(); } if(document.all){ txt=el.createTextRange() txt.execCommand("Copy") window.status='Selected and Copied to Clipboard!' document.WordForm.cpyButton.value="Copied!"; setTimeout("WordForm.cpyButton.value='Copy'",1000) } else window.status='Press Ctrl-C to Copy the Text to the Clipboard' setTimeout("window.status='WebTv users you must Press Cmd & C !'",3000) } </script> <form name="WordForm" > <input type="text" id="Editbox1" size="30" name="Screen" value="Yo wassup dudeee"> <input type="button" width="120" NAME="cpyButton" value="Copy" onClick="cmdA(document.WordForm.Screen)"> However, when the button is clicked, another button shows with the word copied! Can someone show me how can the script display an image (/images/copied.gif) instead of the button. Your support is appreciated npsari
-
Good idea Thats a great way around it I will have to connect to mySQL in the mail submit form Thanks for the info guys Never thought of that
-
Well, the email actually changes so, the field is like that... print "<INPUT TYPE=hidden NAME=\"email\" value=\"$row[Email]\" SIZE=1><BR><BR>\n"; As you can see, the email is derived from the mySQL databse This form allows users to send an email to each other But the reason of using the site for is to hide the email And now, i realized that people can see it from Page Source
-
I am using the below php email from: I have the email field hidden... while($row = mysql_fetch_array($result)) { echo "<form name=\"theform\" action=\"/email.php\" method=\"POST\">"; print "<INPUT TYPE=hidden NAME=\"email\" value=\"myemail@yahoo.com\" SIZE=1><BR>"); print "Your email:"; print "<INPUT TYPE=TEXT NAME=\"sender\" value=\"\" SIZE=25><BR><BR>"; print "Message body:"; print "<TEXTAREA NAME=\"message2\" ROWS=7 COLS=35></TEXTAREA><BR><BR>"; echo("<input type=\"image\" name=\"SUBMIT\" src=\"/h-images/all/email.gif\">"); echo("</form>") } But when a user clicks on view PageSource They can see my email Is there anyway to hide it completely?
-
mySQL situation - moved to a new hosting company
npsari replied to npsari's topic in PHP Coding Help
Ohh, really? So, Does that mean this code will not work... $con = mysql_connect("localhost","name","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("database", $con); because this is what I am using with my pages -
I moved to a different hosting company and now, all my mySQL connections are failing I dont know why!!! the username and password are the same I always get this message: Could not connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46) Do you know what is going on
-
thanksfor the info
-
[SOLVED] please help it's probley somthing simple
npsari replied to jeppers's topic in PHP Coding Help
I dont use SMTP server I do it normally <?php // The subject $subject = "Hi"; // The message $message = "$message"; mail($email, $subject, $message, "From: $sender"); echo "Your message has been sent."; ?> -
I store date in my database using: $Date = date("Y/m/d"); And I store Time using: $tim = localtime(time(),true); $Time=($tim['tm_hour'].":".$tim['tm_min'].":".$tim['tm_sec']); Now, I want to sort Posts... the Latest posted at the Top... SORT BY Date DESC When I do that, the Time damages the sequence SORT BY Time DESC When I do that, the Date damages the sequence How can I sort results by Date and Time
-
How can i exclude a Town from the list of Towns!!!
npsari replied to npsari's topic in PHP Coding Help
ohh, really, well, didnt know that, sorryz -
How can i exclude a Town from the list of Towns!!!
npsari replied to npsari's topic in PHP Coding Help
Hey, thanks Dont u think php should create something better like the exclude function Select distinct Town from ads exclude 'London' AND 'etc..' -
I have a retreive code $q = "SELECT DISTINCT Town FROM ads ORDER BY Town ASC LIMIT 12;"; $res = @mysql_query($q); while($r = @mysql_fetch_array($res)) { echo "$r['Town']}"; } It echos Town names But I dont want the Town London to show How can i do that
-
Hey, good idea It passed my mind, thought i didnt try it much Now it works perfect Thanks much pal