Jump to content

Riparian

Members
  • Posts

    168
  • Joined

  • Last visited

Everything posted by Riparian

  1. Hi Can someone please point me in the direction to find the script for the nifty popup calendar used in the later versions of phpmyadmin ? Cheers and thanks
  2. For anyone who has the same problem... the headers and footers are generated by the browser you are using and not changeable by the program. Just turn off headers and footers in your browser page setup Cheers p.s. still dont know how to force a page eject though
  3. Sorry one more question on Java... How do I force a page eject to the printer ? Cheers
  4. Scenario I am printing a client invoice in house but every printout has the document source at the top of the page and the time etc at the bottom. How can I stop this. Any help is greatly appreciated. Cheers
  5. Hi Guys... Thanks for the debate but is there someone that can assist with the how this re-direct is done Cheers
  6. Thanks for the response but I think the problem (when it exists) is that the header redirect did not work in their browser in the first place which is what creates the problem Cheers
  7. I have found phpmailer is great for html email attachments, mailing lists etc. It takes a little to get your head around to get started but really is very simple once understood. The only prob I have found is those that do not get html email (but it does send text as well)
  8. Scenario PayPal payment requires posted variables for IPN transactions Many sites have something like "if not re-directed in xx click here " This uses href link with GET variables GET variables in this case are very insecure.... How can I submit posted variables to PayPal using a href link ??? Thanks heaps Brian
  9. would this be an htaccess flag ?
  10. Just checked the error logs (thanks for the reminder) and as you can see, although the code stipulates a web address the require is still tacking on the root address in front require('http://www.site2.com/emails/html_inquiry_reply.inc'); require(/xxxhere/local/home/site1/site1.com.au/site2.com.au/emails/html_inquiry_reply.inc): Any thoughts
  11. This is what I use... it might help if ($_FILES['mem_upload']['size'] > 153600 ){ $errs=true; $msg.="Your Upload file was too Big Please Try again with a Smaller File.. "; } // endif file size too big $ext= explode ('.', $_FILES['mem_upload']['name']); $ext[1]=strtolower($ext[1]); if(strtolower($ext[1]) !='png' && strtolower($ext[1]) !='txt' && strtolower($ext[1])!='doc' && strtolower($ext[1])!='pdf' && strtolower($ext[1])!='jpg' && strtolower($ext[1])!='jpeg'){ $errs=true;$msg.='Your Script is not a Valid txt jpg or bmp or png'; }
  12. I have just moved servers - PHP4 to PHP5 I have 2 sites involved Site 1 has the management files plus its own emails Site 2 has its own files plus emails I call the emails from site 2 and send them from the management site. I have used this script for 2 years but it will not include the email under php5 require('http://www.site2.com/emails/html_inquiry_reply.inc'); Please help as I have very little hair left to pull out !
  13. Thank you for that. Something that seems to be happening thoiugh is that when I use the escape string on every write i get output like john\\\\\s dog\\\\s tail Can you tell me how to stop this ? Thanks
  14. I may be completely off track here but this is code I found a number of years ago that I have found invaluable with dynamic varaibles. Everyone told me it could not be done and maybe there are better ways to do it but this is how I remember from DBase1V days. Obviously you need to pull out the bits you need <?php //This loops through all the records that have been displayed on the page. for ($index = 0; $index <= $counter; $index++) { /* This part sets a variable with the names we created in the first section. We start with 0 and go until the number saved in the $index_count variable. */ $varSubmissionID = 'SubmissionID'.$index; $varPostedBy = 'PostedBy'.$index; $varLink = 'Link'.$index; $varDescription = 'Description'.$index; $varApproved = 'Approved'.$index; /* This is the variable variable section. We take the value that was assigned to each name variable. For example the first time through the loop we are at the record assigned with SubmissionID0. The value given to SubmissionID0 is set from the first section. We access this value by taking the variable variable of what SubmissionID0 is. */ $SubmissionIDvalue = $$varSubmissionID; $PostedByvalue = $$varPostedBy; $Linkvalue = $$varLink; $Descriptionvalue = $$varDescription; $Approvedvalue = $$varApproved; //Update the database $sql = "UPDATE submissions SET PostedBy='$PostedByvalue',Link='$Linkvalue',". "Description='$Descriptionvalue' WHERE SubmissionID=$SubmissionIDvalue'"; // $result = mysql_query($sql); //If the link was marked approved set the value of the Approved field if ($Approvedvalue == '-1') { $sql = "UPDATE submissions SET Approved='-1' WHERE SubmissionID=$SubmissionIDvalue"; // $result = mysql_query($sql); } } ?> <?php //Initialize counter variables $index = 0; $index_count = 0; ?> <form method=post action=$PHP_SELF>\n"; <table>\n"; <tr> <td><b>Posted By</b></td><td><b>Link</b></td> <td><b>Description</b></td><td><b>Approved</b> </td> </tr> <?php /* Assuming we already have retrieved the records from the database into an array setting $myrow = mysql_fetch_array(). The do...while loop assigns a value to the $xstr variable by taking the name and concatenating the value of $index to the end starting with 0. So the first time through the loop $SubmissionIDStr would have a value of SubmissionID0 the next time through it would be SubmissionID1 and so forth. */ do { $SubmissionIDStr = SubmissionID.$index; $PostedByStr = PostedBy.$index; $LinkStr = Link.$index; $DescriptionStr = Description.$index; $ApprovedStr = Aprroved.$index; ?> //This section would print the values onto the screen one record per row <tr> <td><input type=hidden name=%s value=%s> <input type=text name=%s value=%s></td> <td><input type=text name=%s value=%s></td> <td><input type=text name=%s value=%s></td> <td><input type=radio name=%s value=-1>Yes <input type=radio name=%s value=0 checked>No</td> </tr> <?php sprintf($SubmissionIDStr, $myrow["SubmissionID"], $PostedByStr, $myrow["PostedBy"], $LinkStr, $myrow["Link"], $DescriptionStr, $myrow["Description"], $ApprovedStr, $ApprovedStr); //Increase counter values by 1 for each loop $index++; $index_count++; } while ($myrow = mysql_fetch_array($result)); // I also had to create an index count to keep track of the total number of rows. echo "<INPUT TYPE=hidden NAME=counter VALUE=$index_count>\n"; echo "<INPUT TYPE=submit></form>\n"; ?> (edited by kenrbnsn to add the tags)
  15. Hi All this is an old topic but I still am confused. php.net says use this on an "unescaped string", so fine, I use it when inserting data and it escapes the data no trouble. I then use stripslashes when displaying the text. BUT If i transfer content from table 1 (which has been escaped) to table 2 the escape characters disappear. Dose this mean that "every" time I retrieve data from a table and then write the data back to a table (even if the data has been escaped before) to I need to use the escape string function ? Any help is greatly appreciated
  16. Hi All I have searched this but cant find a suitable answer. Scenario : Open a pop-up window to view a product and while there add something to a shopping cart in that window. Problem : On closing the pop-up window how do I automatically refresh the main window to reflect the changes made in the pop-up window Any help is greatly appreciated
  17. Hi Guys and thank you very much for the discussion. Just for aschk I think you may have missed the problem. If 2 ppl have the same file open at the same time and person 1 makes a change e.g. adds a line to a text field then saves it, person 2 "still has the original data" in their browser. When person 2 saves his edits then the original data is stored with the changes made by person 2. The edits of person 1 is lost and noone knows about it. I am afraid I can't see the advantage of the timestamp method because even if person 2 is notified that the file has been modified by person 1 there is nothing person 2 can do to save his edits without having to load the file again and start over entering his edits again. ?? I thought about saving the open record numbers in a table to stop them being opened twice. Then having the calling program release them on save but this fails if the calling program terminates in an unforseen manner and does not go through a remove function. Well thats the way I see it but I am by no means an expert and any advise is greatly appreciated. Cheers Brian
  18. Thank you ... this is confirmation for my own thoughts
  19. Hmm ... that was not much help. I have spent the day learning how to Lock the tables and written these functions that appear to do absolutely zip. Can you tell me if I am on the right track ? function LockWrite($TABLE_STRING){ $TABLES= explode(',',$TABLE_STRING); foreach($TABLES as $t_value){ $qry.="$t_value WRITE, " ; } $last_comm=strlen($qry); $Query="LOCK TABLES ".substr($qry,0,$last_comm-2); mysql_query($Query)or die('170 config'.mysql_error()); } function UnLockTables(){ $Query = "UNLOCK TABLES"; mysql_query($query); } Cheers Brian
  20. This is probably a dumb question but I can not find any reference to an answer. Can someone tell me or point me in the right direction ? I have a back end management section that allows more than one person to access a clients records. How can I stop 2 people editing the same record at the same time as obviously the last person to update will overwrite the first. Any help is greatly appreciated PS I have posted this in the ms msql help by mistake- please disregard that one
  21. Thank you for the help ... I can use this,,, I think. But I wish I could find how to close this thread ! Cheers
  22. 1. if Item_Image is called in $query it should be available as <img scr="$item[item_Image]" WIDTH="100" HEIGHT="100" BORDER="0"> if you have created a new field in the table and the $query stipulates what field it wants then your new field will be missing and you will have to add it. e.g. query=mysql_fetch_array('select record_number,etc,etc,etc from table'); you need to add Item_Image. If the $query selects * then this is not the case so long as it is in the table in the first place rather than display the image try echoing the variable to the screen e.g. echo $item[item_Image]; to see what it holds and if it is pointing to the correct directory. Good luck
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.