Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. 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;
  2. 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.
  3. And besides - you want to look at blocks of memory - in the raw. Where is your map? How will you read it/interpret it?
  4. 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.
  5. 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.
  6. 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.
  7. 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?
  8. 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.
  9. You are saving html code in a database? Is this your own CMS that you are writing?
  10. 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.
  11. what do you mean by you send it to database?
  12. 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.
  13. As cyberRobot is pointing out, you have some debugging to do.
  14. Have you actually echo'ed out the query statement before running it so you can see what is being built?
  15. Didn't you get this answer in your post on another forum?
  16. 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.
  17. You have no knowledge of PHP yet you are in charge of purchasing PHP scripts? Seems odd. Hope you didn't pay too much.
  18. You brought it to the developer? And he is not fixing it? And just what is a 'themeforest'? You said that this script was not live anywhere but now you say you have pending sales of it? Are you not a programmer? Not a PHP programmer? Why are you involved if you are not jumping in to fix it?
  19. Please translate.
  20. So? Do you want to fix it now or what? Start doing something. Jacques1 has told you what to look at; I have told you what to read and learn about. Start doing some coding and let's makge some progress. When you post code again please try to limit to what is pertinent. All that html you posted is meaningless to us. The form portion is all we really need in order to connect the dots to the php code. That and the php code (including the top portion with your error checking code) are all we need.
  21. That is because you don't have a header in your mail call. Perhaps you should read the manual where it talks about this.
  22. The mail function requires a 'from' specification. Since you aren't doing it in the call, are you sure that you have a valid from email in your php.ini file? And BTW - what doesn't work actually? Just the mail never shows up?
  23. So the first thing you should have done is to turn error checking on and leave it on while you are working on this. Then you should be doing what Jacques suggests and get rid of the poor coding techniques with the user input fields. And then show us a better attempt at using the mail() function. Please read the manual and fix what you are doing wrong there. (Hint: you need a header that is not the password value or whatever is in $pass)
  24. I don't see the error checking code in your post. Therefore I have no assurance that it was done correctly
  25. I see a poorly formed call to the mail function. I don't see anything to do with phpmailer. Have you checked to see that your update query actual runs? Turn on php error checking too.
×
×
  • 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.