Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Yes - "return" is a horrible name for a table. As for your connect logic - whatever does $sRFlag have to do with it? You do a connect and check if it succeeded but using that variable makes no sense here. PS - using such complicated names for your fields and variables is going to bite you in the a.. more times than you can imagine. I strongly suggest you adopt a consistent style for naming and use it. What you are doing now is going to kill you. You do know that PHP is a case-sensitive language?
  2. I wish I knew what 'slug' was....
  3. How about: $categories = $wctTerms;
  4. The easy way would be to use common signon code that registers people to the same "system" and then modify your verification code to check that "system" instead of the one(s) they currently do. Obviously - if the two apps were well-written and used single signon and verify modules this will be an easy task. If they didn't it will be tedious and probably error-prone. That's about all we can offer since you didn't seem to post any code using the forum's usual posting procedures.
  5. The first thing that would improve it is to completely separate your processes. THINK about your html code and place that at the bottom of your script and insert php vars where you think you will have some dynamically-generated output to be displayed. THEN go back to the top of your script and start handling the task. Receive the input, validate it, use it and then execute the output of your html code. (Personally I use a function to do my entire html output that I call when I'm ready to send it.) Place your JS code either in a separate file to be included by the html portion, or place it in this separated html portion. Same for your css code. Keep the php separate! YOu may have some php/html mixed when you are building a table of output or a dropdown list but that is necessary. The idea is to keep all the static html and css and js away from the logic process.
  6. Maybe you need to do a little reading to teach yourself something before embarking on a full-fledged project?
  7. How do you know how to use them? Well - you wrote them presumably, so use them for the thing(s) that they were designed for. As for your original question. Creating a property inside a class without the declaration at the top is like creating a local variable in a normal (non-oop) function. It's local to the scope and is not known outside of that function, although your examples may lead to that being not true. When you create an object property inside a method you are going against the concept of an object. An object is a well-defined thing that has properties and methods and is meant to function as the entity that it was defined as, not with additional "things" tacked on that are not defined and not known to be part of the object. IOW - it's kinda like what M$ does with their software, and we know where that gets you.
  8. Try adding some English skills to your writing too. It will make you look smarter at least. Periods, Capitals and sentences make for better reading.
  9. You REALLY need to learn to write your code in a better, more readable fashion. (assuming you are in php mode) if ($vTakeout=='y') { echo "<img src='takeoutyes.jpg'>"; } elseif ($vTakeout=='n') { echo "<img src='takeoutno.jpg'>"; } (still in php mode.) OTOH - you can make this easier by doing your logic (the above) before you begin doing your presentation (html) output. Use the above code to set a variable instead and then include that variable inside all the html you will output at the end of the script. Keeping your php code separate from the html/js code as much as possible is to be strived for. Mixing it up makes for a nightmare when doing modifications later on or in simply reading thru the code. if ($vTakeout=='y') $takeout_img = 'takeoutyes.jpg'; else $takeout_img = 'takeoutno.jpg'; Down below in your script where you ouput the entirety of your html just insert this variable. Use the heredocs operator to make this all easier. (in php mode) $code=<<<heredocs .... ... html header code --- --- <header> ... ... .. </header> .. <body....> ... ... ... lines of html.... ... ... <img src="$takeout_img"> ... ... .... end of html... heredocs; echo $code;
  10. And how is $order_complete being saved between script executions? Why not post the signal to the order record in your db? As it is it does not appear to be a value that is being retained.
  11. And besides - you want to look at blocks of memory - in the raw. Where is your map? How will you read it/interpret it?
  12. What are you showing us? Is that data rows? Or is it something you produced by querying your data? Maybe if you showed your data structure the query could be written to give you what you want.
  13. Why not separate the two? Use php to grab the form's data (a basic simple approach) and then build a structured message of some sort (your choice) and just send that as a simple text email.
  14. Problem solved. Found some new material and after a bit more experimenting got it all working. For those interested: To make an ssl connection using IMAP with no 'real' certificate use this: $host = "{domain.net:993/ssl/novalidate-cert}INBOX"; $mailbox = imap_open($host, $emailaddr, $emlaccess); I was using this in a script that was handling forwarded emails on STDIN so the following got me the current message # $imap_obj = imap_check($mailbox); $msg_cnt = $imap_obj->Nmsgs; // get last msg no. that we just processed With the messge number I could then move the message out of the inbox to a specific destination folder that I wanted to archive these emails in: imap_mail_move($mailbox,$msg_cnt,$dest); Note that my dest folder had to be named as follows: INBOX.subfolder.subfolder rather than how some parts of the manual said it had to be formatted. Last but not least and as the manual did tell me, when you do a move like this the original message still sits in the inbox. You have to turn on the flag in the imap_close function to cause this message to be removed once the inbox is closed imap_close($mailbox,CL_EXPUNGE); Note the value is a Constant and needs no quotes. This all had to be done as IMAP since one cannot do folder moves using POP3 apparently.
  15. Trying to use the imap functions to handle moving incoming mail from the INBOX to a separate folder. Read all kinds of stuff on the various functions to read the headers and such and now the move function is killing me. I have studied my host's email configurations and the manuals references on how to make the connection but I am getting nowhere. Here's my connection string: $mailbox = imap_open("{mydomain.net:993/imap/ssl/novalidate-cert}INBOX", $emailacct, $emlaccess); I have tried several different ports and /switch choices and none work. The one I posted is the most often referenced so I show it to you. The problem I keep getting is this error message: Errors: Array ( [0] => Client tried to access nonexistent namespace. (Mailbox name should probably be prefixed with: INBOX.) (0.000 + 0.000 secs). ) As you can see my connection string doesn't use any other mailbox but INBOX so I don't understand the problem here. The error occurs right after trying to do the open, not later when I actually try to use imap_move_mail to move stuff from INBOX to a seperate folder, which btw is NOT underneath eh inbox. Anyone out there used these functions before?
  16. You missed my point. If you are writing a CMS, why don't you post on the CMS-related forum? For many of us here who don't try and re-invent the wheel, what you are doing makes no sense.
  17. You are saving html code in a database? Is this your own CMS that you are writing?
  18. You're missing the question that Requinix is asking you. WHAT DATABASE is being updated by these 'bad bots'? As Requinex says - THAT is your primary problem right now. Stop unauthorized access to your database if it is your database.
  19. what do you mean by you send it to database?
  20. Looks like you don't know how to program yet. When you execute a script it runs from top to bottom, skipping functions until they are actually called from the rest of the main code. In your posted code you are (badly) echo'ing out some html and then executing some PHP code that is not going to run error-free. 1 - put your html at the END so that your php code gets to do what it needs to do first. 2 - LOOK AT YOUR CODE!!! You have a line that looks for a POST array element. Well? Did you do the submit yet to generate that POST array? So far you have done some output but where did you give the user a chance to enter something into that form? He HASN'T even seen it yet!!! 3 - Before you try to process incoming values make sure they have been sent first. Check if your submit button has triggered this script or if the REQUEST_METHOD has been set to POST and you actually have some of your input fields. You are simply referencing it without knowing where you are in the process. 4 - begin your script with a check to see if you have to process a submit or if you have to simply send out the entry form and wait for the submit to happen. Then let the user do his thing and hit the submit button. When your script executes again it will go thru this same code and see what to do then.
  21. As cyberRobot is pointing out, you have some debugging to do.
  22. Have you actually echo'ed out the query statement before running it so you can see what is being built?
  23. Didn't you get this answer in your post on another forum?
  24. You show us a loop that does nothing but show us some output that we have no idea of its origins. Where did $x come from? How are you incrementing it? All you have done with this latest post is show us an echo statement of something. You really need to listen Barand if you want help. He can really help you IF YOU GIVE HIM/US and idea of what you are doing. Is this all the code you have so far that is related to this 'problem'? I hope not because that would imply that you want us to write it for you, not 'help' you with it.
  25. You have no knowledge of PHP yet you are in charge of purchasing PHP scripts? Seems odd. Hope you didn't pay too much.
×
×
  • 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.