Warning: mysql_connect(): Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\appserv\www\sql.php on line 12
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in c:\appserv\www\sql.php on line 13
Warning: mysql_query(): Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\appserv\www\sql.php on line 14
Warning: mysql_query(): A link to the server could not be established in c:\appserv\www\sql.php on line 14
Warning: mysql_insert_id(): A link to the server could not be established in c:\appserv\www\sql.php on line 15
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in c:\appserv\www\sql.php on line 16
thanks 1st.
14 2763
Heya, jolinlim. Welcome to TSDN!
Where's the code that connects to the database?
we need to see the code that connects to the db,
Otherwise make sure the username and password in your script is the same as that in your mysql database connection settings.
below is sql.php -
<?
-
$mysql_server_name = "localhost";
-
$mysql_username = "root";
-
$mysql_password = "";
-
$mysql_database ='freesms';
-
-
function insert_sql($sql)
-
{
-
global $mysql_server_name, $mysql_username, $mysql_password, $mysql_database;
-
-
$conn = mysql_connect( $mysql_server_name, $mysql_username, $mysql_password);
-
mysql_select_db($mysql_database,$conn);
-
$result = mysql_query($sql);
-
$id = mysql_insert_id();
-
mysql_close($conn);
-
-
return $id;
-
}
-
-
function select_sql($sql)
-
{
-
global $mysql_server_name, $mysql_username, $mysql_password, $mysql_database;
-
-
$conn=mysql_connect( $mysql_server_name, $mysql_username, $mysql_password);
-
$result=mysql_db_query( $mysql_database, $sql, $conn);
-
while($row=mysql_fetch_row($result))
-
$array[] = $row;
-
mysql_free_result($result);
-
-
return $array;
-
}
-
-
function other_sql($sql)
-
{
-
global $mysql_server_name, $mysql_username, $mysql_password, $mysql_database;
-
-
$conn=mysql_connect( $mysql_server_name, $mysql_username, $mysql_password);
-
mysql_select_db($mysql_database,$conn);
-
$result = mysql_query($sql);
-
mysql_close($conn);
-
-
return $result;
-
}
-
-
?>
__________________________________________________ ________________
below is contact_us.html - <?
-
include "sql.php";
-
-
-
insert_sql("INSERT INTO `contactus` ( `id` , `name` , `mobno` , `email` , `coname` , `enquires` , `ip` , `time` )
-
VALUES (
-
'', '$name', '$mobno', '$email', '$coname', '$enquires', '$REMOTE_ADDR', NOW( )
-
);");
-
?>
-
-
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
<head>
-
-
<title>Sms2u FREE!</title>
-
<meta name="keywords" content="free sms">
-
<meta name="description" content="send free sms">
-
<meta name="author" content="on_soft@hotmail.com">
-
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
-
<meta http-equiv="Content-Type" content="text/html; charset=big5">
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-
-
<link rel="stylesheet" type="text/css" href="http://sms2u.myvnc.com/style.css">
-
<link rel="icon" href="http://sms2u.myvnc.com/imgs/fv.ico" type="image/x-icon" />
-
<link rel="shortcut icon" href="http://sms2u.myvnc.com/imgs/fv.ico" type="image/x-icon" />
-
</head>
-
<div align="center">
-
<img src="http://sms2u.myvnc.com/imgs/logo.jpg" alt="" width="348" border="0" height="85" />
-
<table cellpadding="0" cellspacing="0" border="0">
-
<tr>
-
<td class="tahoma9boldblue">
-
<a href="index.html" class="tahoma9boldbluelink">HOME</a>
-
-
|
-
<a href="register.html" class="tahoma9boldbluelink">REGISTER</a>
-
|
-
<a href="login.html" class="tahoma9boldbluelink">LOGIN</a>
-
|
-
<a href="sendsms.html" class="tahoma9boldbluelink">SEND SMS</a>
-
-
-
|
-
<a href="faq.html" class="tahoma9boldbluelink">FAQ</a>
-
|
-
<a href="contact_us.php" class="tahoma9boldbluelink">CONTACT US</a>
-
-
-
</td>
-
</tr>
-
</table><div style="padding: 20px; width: 500px; text-align: left"> </div>
-
<div style="background-color: #054691; height: 20px"><img src="http://sms2u.myvnc.com/imgs/lbl.contactus.gif" alt="" width="78" border="0" height="19" />
-
</div>
-
<br> <img src="http://sms2u.myvnc.com/imgs/support.gif" alt="" width="328" border="0" height="55" />
-
-
-
-
<br>
-
<body>
-
<form id="forml" name="form1" method="post" action="contactus">
-
-
<table width="499" border="1" cellpadding="3" bordercolor="#99CC99" bgcolor="#CCFF99">
-
<tr>
-
<th width="151" scope="row"><div align="left"><strong><span class="style2">CONTACT NAME: </span></strong></div></th>
-
<td width="324"><input name="name" type="text" id="name" size="33" /></td>
-
</tr>
-
<tr>
-
<th scope="row"><div align="left"><span class="style2">H/P NUMBER: </span></div></th>
-
<td><label>
-
<input name="mobno" type="text" id="mobno" size="33" />
-
</label></td>
-
</tr>
-
<tr>
-
<th scope="row"><div align="left"><span class="style2">EMAIL:</span></div></th>
-
<td><input name="email" type="text" id="email" size="33" /></td>
-
</tr>
-
<tr>
-
<th scope="row"><div align="left"><span class="style2">COMPAY NAME: </span></div></th>
-
<td><input name="coname" type="text" id="coname" size="33" /></td>
-
</tr>
-
<tr>
-
<th scope="row"><div align="left"><span class="style2">ENQUIRES:</span></div></th>
-
<td><p>
-
<textarea name="enquires" cols="36" rows="5" id="enquires"></textarea>
-
</p> </td>
-
</tr>
-
<tr>
-
<th colspan="2" scope="row"><div align="left"><span class="style3">
-
</span><span class="style3">
-
<label>
-
</label>
-
</span>
-
<label><div align="right">
-
<div align="right"></div>
-
<div align="center"><span class="style3">
-
<input name="submit" type="image" src="imgs/btn.submit.gif" value="SUBMIT">
-
</span></div>
-
</div>
-
</label>
-
<span class="style3"></span><span class="style3"> </span></div>
-
<div align="right"></div><div align="justify"></div></th>
-
</tr>
-
</table>
-
<p> </p>
-
</form>
-
</body>
-
</html>
__________________________________________________ ________________
Database freesms - Table contactus running on localhost
i have double checked the username and password, it was putted corrrectly
and the problem now is
Not Found
The requested URL /contactus was not found on this server.
Apache/1.3.33 Server at localhost Port 80
Check this part of your code: -
<form id="forml" name="form1" method="post" action="contactus">
-
check the file contactus.
It should be located to the same path as contact_us.html. What type of file is that .html or .php? Since you used method as post the file should end in .php
You should write it too.
It should be like this: -
<form id="forml" name="form1" method="post" action="contactus.php">
-
Contactus not found on server.....................
just check it
<form id="forml" name="form1" method="post" action="contactus">
extension of your file contactus.html or .php
Thanks dafodil, u f give me the exactly right point. thank you very much.
i m very appreciated your help .meanwhile, can u tell me how to post a return page with written "thank, for contact us" page. then, back to front page.
Thanks dafodil, u f give me the exactly right point. thank you very much.
i m very appreciated your help .meanwhile, can u tell me how to post a return page with written "thank, for contact us" page. then, back to front page.
You'll just need to redirect a user to another page. You also need to put a button on that redirected page to allow the user to go back.
create a page first with your design..
Coming from a php page, insert this code: -
header("location:nameofthepage.php");
-
dafodil,
Pls specify more details. thanks in advance.
settled again, dafodil. and thanks again for your helping.
do u know how to make advertisement in the website for user to upload. thanks in advance.
and also how to make
Method:insert WIN PIZZA send to 36188,each sms charged $0.30
again, thank in advance.
and also how to make
Method:insert WIN PIZZA send to 36188,each sms charged $0.30
again, thank in advance.
About this part you need to contact a telecommunications company. I think you will pay for about a month or year for that service.
Then they can send the results to your e-mail.
do u know how to make advertisement in the website for user to upload. thanks in advance.
This will be a little bit complicated and the answer will be based on your design. My only advice for securing it is to scan the uploaded file for viruses and disallow users to upload programming scripts as much as possible so that it will not run inside your server..
Heya, jolinlim.
The phrase 'thanks in advance' is actually considered borderline rude on forum sites, as it implies that you won't be taking the time to thank the people who help you individually.
I'm glad that you're appreciative of the help you're receiving on this site. Consider thanking posters *after* they help you to make your token of gratitude more meaningful.
Thanks!
MODERATOR
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ryan Schefke |
last post by:
------=_NextPart_000_0077_01C34C8B.2B90C960
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
..I just sent this out to the win32 distribution list but no one has...
|
by: John |
last post by:
Hello.
I am currently working through a book on Dreamweaver and using PHP. I
am having a little trouble with setting up the database though. I
have php 4.2.3 and MySQL 4.0.20a. I am running...
|
by: Steve |
last post by:
Hi,
Yesterday I signed up for another dedicated linux server with the hosting
company I use and I am having problems getting MySQL 4.1.3 working on it.
I've tried just about everything I can...
|
by: adnan alsamari |
last post by:
Hi,
I can only access mysql through the root by typing mysql -u root -p. But
when I use any other user to connect to mysql I get the access denied error
message. Mysql is installed on windows xp. ...
|
by: dstewart |
last post by:
Situation:
One common MySQL database server on SuSE 9.1 with all updates.
Uses 'rinetd'. Has entries for the appropriate IP addresses of all
servers.
NOTE: If the appropirate entries are NOT in...
|
by: SKB |
last post by:
Hi,
I am absolutely new to this area. I am getting the following difficulty
:
Access denied for user 'ODBC'@'localhost' (using password: NO)
when I try the mysql command from within the...
|
by: rajbala.3399 |
last post by:
Hi ,
I want to download sql in my linux system...........
# rpm -ivh
MySQL-server-5.0.24a-0.glibc23.i386.rpm MySQL-cl
ient-5.0.24a-0.glibc23.i386.rpm
Preparing... ...
|
by: servo |
last post by:
I created a user "test1" (which then got the username "debscrof_test1" from CPanel), a password for the user "test2", and then added the user to a new database "testdb" with all priviliges
Then a...
|
by: sbettadpur |
last post by:
hello
I am getting following error while connecting to mysql through php
Warning: mysql_connect() : Access denied for user: 'pds@localhost' (Using password: YES)
Actually I hosted one...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |