-
Posts
498 -
Joined
-
Last visited
Never
Everything posted by jesushax
-
thanks im gonna try that one out do i set the folder to chmod 777 or the specific files? thanks
-
hi here is my vistor coutner code <?php $count_my_page = ("".$_SERVER['DOCUMENT_ROOT']."/includes/counter.txt"); $hits = file($count_my_page); $hits[0] ++; $fp = fopen($count_my_page , "w"); fputs($fp , "$hits[0]"); fclose($fp); echo $hits[0]; ?> i get these error messages 2 questions: 1. is this script any good, i just want a simple how many vistors ive had id like to have a page that just says Vistors Unique Vistors : 123456 This Month Vistors: 123456 Total Visitors: 123456 if someone could point me to a script this simple or perhaps show me one you have previosuly created that would be great 2. What permissons do i have to set to these files, as i have to get my host to do it Thankyou
-
thanks
-
what does imploding do?
-
can i not add a mysql_real_escape_string to that aswell?
-
so this is how it works for updating a table $TSQL = "UPDATE tblDirectory SET"; foreach($_POST as $key => $value){ $TSQL .= " $key='".mysql_real_escape_string($value)."', "; } how would we do it for adding? no idea where to start here or am i going to ahve to write out each variable? Cheers
-
[SOLVED] error in sql statment, someone spot it o rknow why?
jesushax replied to jesushax's topic in PHP Coding Help
that got it thanks alot -
[SOLVED] error in sql statment, someone spot it o rknow why?
jesushax replied to jesushax's topic in PHP Coding Help
that didnt work the comma is still there :S -
[SOLVED] error in sql statment, someone spot it o rknow why?
jesushax replied to jesushax's topic in PHP Coding Help
rtrim does that stand for righttrim, and will look for the last comma on the right? that how that works? -
[SOLVED] error in sql statment, someone spot it o rknow why?
jesushax replied to jesushax's topic in PHP Coding Help
oh if i put the comma in the loop ID = $_POST["CompanyID"]; $TSQL = "UPDATE tblDirectory SET"; foreach($_POST as $key => $value){ $TSQL .= " $key='".mysql_real_escape_string($value)."', "; } $TSQL = $TSQL." WHERE CompanyID='$ID'"; mysql_query($TSQL) or die (mysql_error()); then the last value which doesnt need a comma after it, how do i get rid of it when im looping? eg my code now reads where soemthin='something', WHERE ID=...... i dont need that extra comma -
[SOLVED] error in sql statment, someone spot it o rknow why?
jesushax replied to jesushax's topic in PHP Coding Help
ahhhh seen, cant belive i didnt see it lol it was probably cos of the foreach loop first time ive used this method thankyou -
you mean you want to use php to turn scan documents, i dont think that can be done you need to run your scanner software to scan documents
-
thankyou very much
-
this $sql = "UPDATE your_table SET"; while($_POST as $key => $value){ $sql .= " $key='$value'"; } $sql = $sql."WHERE CompanyID='$ID'" gives Parse error: syntax error, unexpected T_AS in C:\Websites\admin\trades\edit_mem.php on line 10 line ten is while($_POST as $key => $value){
-
i cant figure out how to do it can you show an example? <?php switch (@$_GET["action"]) { case "edit": $sql = "UPDATE tblTest SET"; while($_POST as $key => $value){ $sql .= " $key='$value'"; } mysql_query($sql); echo "done\n"; default ?> <form method="post" action="?action=edit> <input type="text" name="field1" /> <input type="text" name="field2" /> <input type="text" name="field3" /> </form> <?php break; }
-
thats the one i was after xurion i know how to collect information using $_POST how are keys and valuse defined how does that work? Cheers
-
could you explain a lilttle more, example maybe? thankyou
-
hi i know theres a quick way of doing this ive seen it, ill explain... i ahve a form with many fields in now if i make the forms the same names as the mysql field names how do i make an array from the data to use as a sql statement hope you understand my question :S Thanks
-
yeah i found that tutorial, but i cant get my host to install it and cant run the fdfforge thing can it not be done without any third party script? CHeers
-
does anybody have livecycle and know how to populate a form with mysql data? this quetsion is really killing me here, no one can seem to properyl help :S thanks
-
to explain further i already have a pdf document its laid out in a specific way and i want to get data from my mysql datbase into this pdf form i have adobe livecycle 8.0 and ths uses xml ive looked at php xml code and am not understanding how it works how i get my records into the form fields Anyone know, getting really desperate in trying to figure this out now... Thanks
-
give the checboxes differrent names then $checkbox1 = $_POST["checkbox1"]; $checkbox2 = $_POST["checkbox2"]; and so on
-
Hello all, just wondering if anybody could tell me how i would get php/mysql into the xml of a PDF document? im trying to get data from my mysql database into my pdf form Thanks
-
Use the form field names to get the values $stuff1 = $_POST['email']; $stuff2 = $_POST[first_name'];