|
sharkbc wrote: Access denied for user 'ODBC'@'localhost' (using password: NO)
Check your configuration file as it appears you can't connect to the database using your credentials. Your new install probably overwrote the config file.
|
|
|
|
|
Dear Marc Firth !
The configuration file has no change(I checked).
My website "works well" except my component.
Thanks anyway !
|
|
|
|
|
I found solution. It now work well
sharkbc
Free ware
|
|
|
|
|
Hi Guys,
I am using MySQL Administrator 1.2.17. And my problem is I cannot access the MySQL remotely from the web server. I have the dbHost, dbUsername, dbPassword. But when I tried accessing it through MySQL Administrator tool I got an error that says...
Error:
Could not connect to the specified instance. MySQL Error Number 2005
Unknown MySQL server host '...' (11004)
Is there a way on how can I get through this?
Thanks
hifiger2004
|
|
|
|
|
yeah, fix whatever is in your dbHost variable...
|
|
|
|
|
Hi all.
I am new to PHP and trying to learn it.I have created a web page and defined items as below :
<form method="POST" action="send.php">
<font color="green"> Full Name : </font>
<input type="text" name="name" size="20">
<font color="green"> Gotra(Clan) : </font>
<input type="text" name="gotra" size="20">
<font color="green"> Father's Name : </font>
<input type="text" name="fname" size="20">
<font color="green">Details of Prasad to be Offered : </font>
(eg.: name of temple, quantity of prasad, specific date & any other requirements)
<textarea rows="5" name="prasad" cols="40" ></textarea>
<font color="green"> Any Wish to God : </font>
<textarea rows="5" name="wish" cols="40" ></textarea>
<font color="green"> Postal Address : </font>
<textarea rows="5" name="address" cols="40" ></textarea>
<font color="green"> Phone no. : </font>
<input type="text" name="phone" size="20">
<font color="green"> Preferred Time of Contact : </font>
<input type="text" name="time" size="20">
<font color="green"> Email address : </font>
<input type="text" name="email" size="20">
<br>
<input name="Submit" type="submit" class="input" value="Send">
<input name="Submit2" type="reset" class="input" value="Reset">
</br>
</form>
and the send.php has following block of code :
<?php
if(isset($_POST['submit'])) {
$to = "gagan.u20@gmail.com";
$subject = "E-Prasad Details";
$name_field = $_POST['name'];
$gotra_field=$_POST['gotra'];
$fname_field = $_POST['fname'];
$prasad=$_POST['prasad'];
$wish=$_POST['wish'];
$address=$_POST['address'];
$phone_field=$_POST['phone'];
$time_field=$_POST['time'];
$email_field=$_POST['email'];
$body = "From: $name_field\n Gotra: $gotra_field\n Father's name: $fname_field\n Details of prasad to be offered : $prasad\n Any wish to God: $wish\n Postal address : $address\n Phone no. : $phone_field\n Preferred time of contact : $time_field\n E-mail address : $email_field";
echo "Data has been submitted!";
mail($to, $subject, $body);
} else {
echo "An error occurred! Please try again.";
}
?>
Now the problem is, when I fill the form and click og sublit button, it gives an error that "An error occurred! Please try again."
Tell me where am I wrong in writing the code. Tell me the correct code.
Thanks.
Gagan
|
|
|
|
|
Why do you check
if(isset($_POST['submit'])) ? Obviously that is false and you've trapped the problem and displayed the error message you wrote.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
ok, then tell me what should I write to send e-mail because I am new to PHP.
Help me.
Thanks.
Gagan
|
|
|
|
|
Your email sending part looks fine. I use
mail($to, $subject, $contents, $from_header); with the $from_header, although that might be optional. But that's not the problem you are seeing -- your code isn't even getting there.
Looking at your PHP code, the first thing executed is
if(isset($_POST['submit']))
Since you get the message you showed, obviously that is being evaluated as false, so the else part is executed showing the message.
So my question to you is: Why are you checking to see if the 'submit' POST variable is set? That's where your code is having problems -- before it ever gets to sending the email.
My suggestion is to take the if/else out and run the code to send the email. That should work if email is allowed on your server. If it works, then you can go back and check for whatever you want to check for with the if statement.
See the following links for examples:
http://www.webcheatsheet.com/php/send_email_text_html_attachment.php[^]
http://php.about.com/od/phpapplications/ss/form_mail.htm[^]
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Thanks for your help. I just removed the line if(isset($_POST['submit'])) and it worked.
Thanks 
|
|
|
|
|
Glad to hear it works!
I'd also remove the rest of the if/else braces. To check for errors you probably should wrap the mail command in an if, too. See the links I posted before for examples.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
here:
<input name="Submit" type="submit" class="input" value="Send">
and here :
if(isset($_POST['submit']))
so
if(isset($_POST['submit'])) =>if(isset($_POST['Submit']))
This is a common problem
|
|
|
|
|
regarding reading elements to array from dialog ,i.e i want to read elements from text box and put that in array and display them.any one can can give me.
|
|
|
|
|
This is best handled by javascript. Try doing a google search for "javascript popup writing to parent".
The basic logic of it is when you open a popup window, there s a special reference to the parent window in javascript. You can use this to fill out a variable or array from the popup window.
all the best!
cjoki
|
|
|
|
|
|
If you take a look at your source code, the "/" are outside of any HTML tag that you echoed onto the page. If I had to venture a guess, it would be a slight discrepancy in the way you echoed your HTML. I use String literal quotes (the single quote) '<p>String Literal</p>' (Versus the normal string using double quotes) "<p>Normal String</p>" . I suggest messing around with different ways to echo the data. Perhaps using the concatenation "." between your variables and other string literals. Say '<p>Dexter Morgan ' . $variable . ' the man discretely.</p>' . You may have used the concat as well as the rest of my suggestions, but I cant see your code :P.
I hope this helps.
|
|
|
|
|
Thanks.Can I have your Email,let me send you my code!
|
|
|
|
|
I would rather not post it on here :P But, feel free to join my forums and post it as a topic in the PHP section, or email me on there if you wish.
www.pixnorth.com/pixforum
|
|
|
|
|
hii..
Sombody please help me how to implement streaming for videos in website.. 
|
|
|
|
|
I want to implement ffmpeg streaming server in website ,
videos that users want to watch, those videos has to be streamed from the server ..
|
|
|
|
|
|
<script language=JavaScript>
<!--
function check_length(my_form)
{
maxLen = 150;
if (my_form.my_text.value.length >= maxLen) {
var msg = "You have reached your maximum limit of characters allowed";
alert(msg);
my_form.my_text.value = my_form.my_text.value.substring(0, maxLen);
}
else{
my_form.text_num.value = maxLen - my_form.my_text.value.length;}
}
</script>
<?php
mysql_connect('localhost','eskool','eskool') or die("Table not connected");
mysql_select_db('eskool') or die("Database not connected");
$num=$_POST["numrow"];
$cls=$_POST["cls"];
$sec=$_POST["sec"];
$status=$_POST["status"];
$mon=$_POST["mon"];
$feetype=$_POST["fee"];
if($status=="Pending"){
$j=0;
for($i=1;$i<=$num;$i++)
{
$che=$_POST["ck$i"];
if(isset($che))
{
$query=mysql_query("select * from stud_reg where regno='".$che."'") or die("Not Select");
$row=mysql_fetch_array($query);
$nam=$row["fstname"].$row["lname"].'.'.$row["initial"];
$cont=$row["contact"];
$query2=mysql_query("select * from `2009` where month='".$mon."' and feetype='".$feetype."' ") or die("Not selected");
$row2=mysql_fetch_array($query2);
$paydat=$row2["paydate"];
$sms='http://smsc11.com/corp/SendingSms.jsp?uname=aker&pass=aker&mobile=';
$sms=$sms.$cont;
$msg="&msg=Please+note+that+$feetype+for+your+child+$nam+is+due+on+the+$paydat+-+xyz+school+,+Bangalore";
$send="$sms.$msg";
echo $send;
header( "Location:$send" ) ;}
i am trying for an sms module which sends sms to each selected student. i am tryin with an api from smsc11.com. but the problem which i am facing is once i redirect to that api the loop is not working.it sends for only one student but not for all.can anyone plz throw some light on this.
modified on Saturday, December 5, 2009 4:22 AM
|
|
|
|
|
hello everyone... i am new to this site.i posted my stuff but didnt get any reply.i am not sure if i posted it the rite way.If am wrong can anyone point out that to me.
|
|
|
|
|
Sorry I have not worked with sms. But from the code you showed, you use the header() function. when I user logs into you solution, and hit this section of code they will be redirected to the location specified...on a different server. This is outside of the loop you are using.
Try doing a test by commenting out the header function and just echoing the sms to the screen. that will tell you if the loop logic is good, but once the header function is enabled, it is going to do the same thing.
I suspect you need a different design for what you are trying to do. Maybe a cron'd script would be better.
|
|
|
|
|
Hi!
I have a php page and I want to execute sql command after button click event.
I put Confirm javascript function to get user choices on sql query and it returns true or false.
but I could not bound this query execution on button click event whenever page is loaded sql command is executed without controlling the result of confirm function.
|
|
|
|