-
Posts
360 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by gongpex
-
-
Ask your hosting service.
A : I had ask to them, and they told me if I use free hosting (subdomain) I cannot use that feature.
Or you can install a sendmail application locally, I use postfix on my Mac.
Q : If I install this (postfix) can I use it from hosting online (so that user can send email) or only can be used from localhost?
or Is there another solution?
please help
Thanks
-
Hello,
I had try to send email using code that I got from w3schools :
<?php// display form if user has not clicked submitif (!isset($_POST["submit"])) { ?> <form method="post" action="<?php echo $_SERVER["PHP_SELF"];?>"> From: <input type="text" name="from"><br> Subject: <input type="text" name="subject"><br> Message: <textarea rows="10" cols="40" name="message"></textarea><br> <input type="submit" name="submit" value="Submit Feedback"> </form> <?php} else { // the user has submitted the form // Check if the "from" input field is filled out if (isset($_POST["from"])) { $from = $_POST["from"]; // sender $subject = $_POST["subject"]; $message = $_POST["message"]; // message lines should not exceed 70 characters (PHP rule), so wrap it $message = wordwrap($message, 70); // send mail mail("gong@gmail.com",$subject,$message,"From: $fromn"); echo "Thank you for sending us feedback"; }}?>
I put this file on my hosting, and then I try to send into gong@gmail.com
but I didn't receive anything message from this.
btw, I don't understand with :
Make sure you're testing that on a server that can actually send email.
Q : Where usually I can found this server?
please help
thanks
-
thanks before,
but this is not what I was mean,
I think I need to start from beginning,
<?php$to = "gong@gmail.com";$subject = "My subject";$txt = "Hello world!";$headers = "From: webmaster@example.com" . "rn" ."CC: somebodyelse@example.com";mail($to,$subject,$txt,$headers);?>
this code just sample,
my Question actually :
Q : Why when I try to send message to email (on field to gong@gmail.com), the subject, and message not deliver on my email?
(when I open my gmail account there is no message about this)
Q2 : What I need to deliver this message to actual email?
please help
thanks
-
I know basic works on php form to send email, but about the email reply I don't know
Q : what I need to build this feature?
so please help
thanks
-
Hello everyone,
I think website will be flaw if there is not this feature,
Q : what I must do so that I can have this feature?
note : I had try to using PHP email form to make this, but that's useless
please help me
thanks
-
hello everyone
sometimes when I see on php.net I often see sign like this : ->
Q : what the meaning of this sign?
Q2 : where I can found the php "sign meaning" list?
please help
thanks
-
Hello everyone,
because on country where I live currently, almost need skill to build software using delphi
so, I have plan to learn it,
but I don't know start from to where to learn it.
my question :
Q : what's requirement to learn delphi?
Q2 : if php I can download from php.net so, where I can download delphi for free?
please tell me
thanks
-
That's not an error from the PHP API, that's an error from the actual database
Q : so, I must change with other database or database version to avoid this error?
thanks
-
hello everyone,
when I tried to input password on password form, my PHP can't to display it's value,
so it cause unable to recorded on database,
this is my simple form :
reg.php
<form name="fm_submit" id="fm_submit" action="reg-conf.php" method="post"><input type="password" maxlength="16" class="inpt-fm" name="u_pass" id="u_pass" /></form>
and this the destination reg-conf.php
$u_pass = $_POST("u_pass"];
when I put :
echo "$u_pass";
it didn't show anything
Q : what's mistake on my code?
please help
thanks
-
hello,
you right, it can be recorded after giving default value.
many thanks about this,
but about :
sounds like that field in your table can't be NULL.
Q : yes, but I wonder, why it can be occurs?
when I use old PHP version with using mysql not mysqli it can be record without giving default value.
please explain to me
thanks again
-
Hello all,
I think this code, is what did you mean (mysqli_error())
<?php require("connect_db.php"); mysqli_query($connect,"SELECT * FROM member"); $user = $_POST['test']; $name = $_POST['num']; $ins = mysqli_query($connect,"INSERT INTO member(m_name,m_user) VALUES ('$name','$user')"); if(!$ins) { printf ("Errormessage %s n",mysqli_error($connect)); } else { printf ("recorded"); } ?>
this code result : Errormessage Field 'm_pass' doesn't have a default value
Q : how to fix this problem ?
please help
thanks
-
I think I need to clarify about this :
- Is code like :
<?php$host ="localhost";$user = "root";$pass = "1234567";$database = "test";$connect = mysqli_connect($host,$user,$pass);$data = mysqli_select_db($connect,$database);echo mysqli_errno($connect). ":" . mysqli_error($connect). "n";?>
Q : not what did you mean?
if so, please show me what code that supposed I use
please help
many thanks
-
hello,
sorry for long reply,
I don't see you using it in this latest code though.
this is my code :
connect_db-server.php
<?php$host ="localhost";$user = "root";$pass = "1234567";$database = "test";$connect = mysqli_connect($host,$user,$pass);$data = mysqli_select_db($connect,$database);echo mysqli_errno($connect). ":" . mysqli_error($connect). "n";?>
this result : 0 :
com.php :
<form name="test" action="test.php" method="post"> user : <input type="text" name ="test" id="test" /><br /> name : <input type="text" name ="num" id="num" /> <!--id : <input type="text" name ="id" id="id" /> --> <input type="submit" value="SUBMIT" /></form>
test.php as destination and insert into syntax location :
<?php require("connect_db-server.php"); mysqli_query($connect,"SELECT * FROM person"); $user = $_POST['test']; $name = $_POST['num']; $ins = mysqli_query($connect,"INSERT INTO person(user,name) VALUES ('$user','$name')"); if($ins) { echo "n". "inserted"; } else { echo "n". "trouble"; } ?>
this result : trouble
today I had check what php version that used by my web hosting,
my php version is 5.3.0 and my web hosting using version 5.3.1
but I still have problem like this, that after I import data from web hosting server (database.sql),
I astonished, when I create database manually then I use insert into syntax like on above it's result : "inserted" or successful.
But after I import database.sql from my web hosting then I use insert into syntax, it's shown : "trouble" or failed.
(this is same name database,table and column)
Q : Is different php version can give some effect on import and export SQL data?
please help me
thanks
-
like we've told you in other threads, use error handling / reporting
did you mean mysql_error() ? if so, please see on this thread post #7 .
actually have the code tell you what the problem is.
well, this is my code :
<?php require("connect_db.php"); mysqli_query($connect,"SELECT * FROM member"); $user = $_POST['test']; $name = $_POST['num']; $ins = mysqli_query($connect,"INSERT INTO member(m_user,m_name) VALUES ('$user','$name')"); if($ins) { echo "n". "inserted"; } else { echo "n". "trouble"; } ?>
this is registered.php
and this is my form file :
<form name="test" action="registered.php" method="post"> user : <input type="text" name ="test" id="test" /><br /> name : <input type="text" name ="num" id="num" /> <input type="submit" value="SUBMIT" /></form>
this is register.php
in here I just use simple form just to test whether database can be record or not,
this is my problem : when I use code on above (registered.php) using database "exercise" it won't to record data from register.php, but if I use database "test" (with change connect_db.php) it can be record.
for more information about both database and my problem, please read my post on #17 again.
thanks
-
I think today I found my true problem,
please see these code :
CODE no 1)
<?php require("connect.php"); mysqli_query($connect,"SELECT * FROM person"); $user = $_POST['test']; $name = $_POST['num']; $ins = mysqli_query($connect,"INSERT INTO person(user,name) VALUES ('$user','$name')"); if($ins) { echo "n". "inserted"; } else { echo "n". "trouble"; } ?>
this is connect.php
<?php $host = "localhost"; $user = "root"; $pass = "12345678"; $dtb = "test"; $connect = mysqli_connect($host,$user,$pass); $db = mysqli_select_db($connect,$dtb);?>
But, after I change it like this (change database also) :
CODE no 2)
<?php require("connect_db.php"); mysqli_query($connect,"SELECT * FROM member"); $user = $_POST['test']; $name = $_POST['num']; $ins = mysqli_query($connect,"INSERT INTO member(m_user,m_name) VALUES ('$user','$name')"); if($ins) { echo "n". "inserted"; } else { echo "n". "trouble"; } ?>
this connect_db.php
<?php$host ="localhost";$user = "root";$pass = "12345678";$database = "exercise";$connect = mysqli_connect($host,$user,$pass);$data = mysqli_select_db($connect,$database);?>
on CODE no 1 this is successful to record data it's display : "inserted" , but after I change it like CODE no 2 it's display "trouble",
note : database test and table person I made it manually.
: but database exercise and table member I got it from import SQL (it's shape extension .sql) from phpmyadmin (this still use mysql not mysqli)
so,database exercise is from my old data (from my web hosting)
Q : Is SQL file data that I got from import unable to record data ?
please help
thanks
-
Q : so, in other word I need to configure php.ini ?
_________________________________________________________________________
OQ : what do you think about PostGre SQL? Is that more effective and safe than mysql or PDO ?
-
No, I want just to test URL rewrite,
I want to : from : localhost/index.php become localhost/index
and
localhost/?p=example become localhost/example
please help
thanks
-
Hello,
I had tried to connect PDO using this code :
<?php$user = "root";$pass = "12345678";try { $dbh = new PDO('mysql:host=localhost;dbname=test',$user,$pass); foreach($dbh->query('SELECT * from person') as $row) { print_r($row); } $dbh = null;} catch (PDOException $e) { print "Error! :" . $e->getMessage()."<br/>"; die();}?>
it's result : "Error! :could not find driver"
Q : How to fix this problem?
OQ : So, is oracle DB not free?
thanks
-
hello,
I had visit on : http://php.net/pdo
but when I open about requirement : http://id1.php.net/manual/en/pdo.requirements.php
the page shown : "No external libraries are needed to build this extension"
Q : so, that's mean I don't need to download database anymore, just use mysql database and then change the configuration on php.ini?
_________________________________________________________________________________________________________
thanks for OFF answer, I appreciate it, but I still wonder with oracle database,
OFFQ : Is this database is more powerful than other database? (because I heard oracle DB, more complicated than other database)
-
hello,
yes you right, if user open test.php this will change to test2.php,
but when I tried this on local server (localhost/test.php) this won't work, and the result still same only open test.php not open test2.php,
I use this just to try if "RewriteEngine " work or not.
Q : Is there something wrong on my http.conf?
please help
Thanks
-
hello,
thanks this work well even "insert into" can be record data now.
but I want to ask about PDO,
Q : Is this same with mysql? where I can download it?
__________________________________________________________________________________________________________
OFFQ : I want to ask what OS that you are use currently? if you using linux please give me tutorial about it, because I want to try to use linux,
btw I heard from my friend if linux can be modified by ourself (using C or C++) is that true?
(I really2 appreciate and thanks again if you want to answer my OFFQ because this important for me)
-
I had tried using mysql_error() on connection too as what thescientist said, but the result is : "0 :"
please see :
<?php$host ="localhost";$user = "root";$pass = "12345678";$database = "gong";$connect = mysql_connect($host,$user,$pass);mysql_select_db($database,$connect);echo mysql_errno($connect). ":" . mysql_error($connect). "n";?>
I had tried to change setting from mysql to mysqli but it didn't work here my code :
<?php $host = "localhost"; $user = "root"; $pass = "12345678"; $dtb = "gong"; $connect = mysqli_connect($host,$user,$pass); $db = mysqli_select_db($dtb,$connect); if($db) { echo "successful connect"; }else{ echo "there is failure"; } ?>
the result is : there is failure
Q1 : Is there some mistake configuration on my php.ini? (on attach file on php.txt please rename it on .ini)
Q2 : if I change mysql to mysqli, is data that I imported from mysql (data.sql for example) can be exported to database that using mysqli?
please help
thanks
-
hello,
I had tried to use mysql_error() like this :
<?php$host ="localhost";$user = "root";$pass = "12345678";$database = "gong";$connect = mysql_connect($host,$user,$pass);mysql_select_db($database,$connect);echo mysql_errno($connect). ":" . mysql_error($connect). "n";?>
and also :
<?php$u_user = $_POST["u_user"];$u_pass = $_POST["u_pass"];$u_name= $_POST["u_name"];$u_address =$_POST["u_address"];$u_address2 =$_POST["u_address2"];$u_phone = $_POST["u_phone"];$u_cell = $_POST["u_cell"];$u_email = $_POST["u_email"];$u_country = $_POST["u_country"];$u_city = $_POST["u_city"];$u_post = $_POST["u_post"];$u_security = $_POST["u_security"];$secure = $_POST['secure'];$u_join = date('D d M Y');$u_save = mysql_query("insert into member (m_user,m_pass,m_name,m_email,m_phone,m_cell,m_address,m_address2,m_country,m_city,m_join,m_security,m_secure,m_post) values ('$u_user','$u_pass','$u_name','$u_email','$u_phone','$u_cell','$u_address','$u_address2','$u_country','$u_city','$u_join','$u_security','$secure','$u_post')"); echo mysql_errno($u_save). ":" . mysql_error($u_save). "n";?>
but it's didn't result anything, it only show 0 :
Q : Is there mistake on placed this code?
: I astonished, why only "insert into" syntax that got trouble, another syntax is alright............
please help
thanks
_________________________________________________________________________________________________
thanks before for your off answer,
OQ : I heard from my friend if linux can be modified, but it must using C or C++ is that true?
-
mysql error log did you mean?
I found this on : log_error
140307 21:50:30 [Note] Plugin 'FEDERATED' is disabled.140307 21:50:30 InnoDB: Initializing buffer pool, size = 44.0M140307 21:50:30 InnoDB: Completed initialization of buffer poolInnoDB: The first specified data file .ibdata1 did not exist:InnoDB: a new database to be created!140307 21:50:30 InnoDB: Setting file .ibdata1 size to 10 MBInnoDB: Database physically writes the file full: wait...140307 21:50:31 InnoDB: Log file .ib_logfile0 did not exist: new to be createdInnoDB: Setting log file .ib_logfile0 size to 22 MBInnoDB: Database physically writes the file full: wait...140307 21:50:33 InnoDB: Log file .ib_logfile1 did not exist: new to be createdInnoDB: Setting log file .ib_logfile1 size to 22 MBInnoDB: Database physically writes the file full: wait...InnoDB: Doublewrite buffer not found: creating newInnoDB: Doublewrite buffer createdInnoDB: Creating foreign key constraint system tablesInnoDB: Foreign key constraint system tables created140307 21:50:35 InnoDB: Started; log sequence number 0 0140307 21:50:35 [Note] Event Scheduler: Loaded 0 events140307 21:50:35 [Note] C:Program FilesMySQLMySQL Server 5.1binmysqld: ready for connections.Version: '5.1.73-community' socket: '' port: 3306 MySQL Community Server (GPL)
note : this error log I got from function : show variables like '%log%';
when I open mysql
please help me
thanks
_________________________________________________________________________________________________________
off : Can I know what OS that you are use currently? I ask this because since I use windows 8, I always found a problem during installation web software
like this, it's different while I use windows XP. Again, thanks if you answer this off question
automated email reply for forgot password
in General
Posted
Hello,
thanks for answer
Q : How about free email hosting Can I use it?
Thanks.