manalnor Posted February 21, 2011 Share Posted February 21, 2011 Hello dear friends, I've 2 files x.php and y.php and func.php Where x.php is an form <form action="y.php" method="post" name="form"> Name : <input name="name" type="text" id="name" value=""> <input type="Submit" name="Submit" value="Save"> it should send informations to file y.php and file y.php include "func.php"; $sql= "update table set name='$name'"; executeupdate($sql); at func.php there is function of executeupdate as following function executeUpdate($sql) { mysql_query($sql) or die("query failed: $sql".mysql_error()); } Now x.php ---> send info to y.php that needs func.php to update the database table NOW !!!!!! my question why why why it works with an hosting and not working on other hosting. does function executeUpdate($sql) no longer work or what ! please help and advice me thanks Link to comment https://forums.phpfreaks.com/topic/228442-function-executeupdate/ Share on other sites More sharing options...
BlueSkyIS Posted February 21, 2011 Share Posted February 21, 2011 what is not working? any errors? what is happening or not happening? Link to comment https://forums.phpfreaks.com/topic/228442-function-executeupdate/#findComment-1177941 Share on other sites More sharing options...
manalnor Posted February 22, 2011 Author Share Posted February 22, 2011 the error when i click submit, it does not update the database table with the new entry. Indeed there is connection, assume it. Well i've tried it on many hosting some works and other not then i figure out if i made that changes, it will works For file x.php if(isset($_POST[s1])) { $qeg = "update table set name = '$_POST[name]' "; $reg = mysql_query($qeg) or die(mysql_error()); echo "Updated"; } <form action="y.php" method="post" name="form"> Name : <input name="name" type="text" id="name" value=""> <input type="Submit" name="s1" value="Save"> this will works ! so i only changed function executeUpdate so any Why Link to comment https://forums.phpfreaks.com/topic/228442-function-executeupdate/#findComment-1178085 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.