AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
How to show input value in email subject line
AyKay47 replied to imjeffw's topic in Third Party Scripts
from the looks of it, you can probably simply concatenate the company name onto the end of your $subject_admin_email variable.. if($_POST['companyName'] != "") $company_name = $_POST['companyName']; $message .= "Company: $comnay_name \n"; $subject_admin_email .= " $company_name"; Note: since mail is parsed as text, you will want to replace your breaks (<br>) with newlines.. (\n) like i have done above.. and in your headers, you will want to replace the (\n) with (\r\n) -
try a print_r($_SESSION); to confirm that these sessions are being stored with the proper values for later use
-
How to show input value in email subject line
AyKay47 replied to imjeffw's topic in Third Party Scripts
would be much easier to piece this together if I could see the entire code please -
i see your point about my code not accepting single quotes and your right on that one, i'm not a big fan of using regex on html anyway, too many things to take into account here and the code needs to be consistently static throughout to receive the desired results..
-
if your page is still blank, paste your current code
-
you recommend it i'm guessing? I use regex alot so anything that can cut down on my brain power time is a good thing..lol...what is the functionality, what all can you do with it?
-
never heard of regex buddy, looks like it could be useful..if it's free
-
bottom line, the regex he posted won't catch anything if the user includes spaces like i said above.
-
your code needs alot of cleaning up and right now i'm too lazy to do it, like for instance you don't need a while loop if you are expecting only one output row for your query, makes no sense, and you can most certainly learn from someone elses script that works.. i never said copy and past it...i asked you a question 3 times and you just answered it now..pfff
-
order a foreach based on an array in the array
AyKay47 replied to dadamssg87's topic in PHP Coding Help
depends on what you are trying to do here, are you having issues with this script? -
you're not understanding what im asking... http://inobscuro.com/tutorials/simple-php-unique-visitors-counter-30/
-
so you don't receive any errors at all in your error.log? Any mysql errors?
-
okay so you would do something like this i believe.. $checkbox = $_POST['checkbox']; //depends on what method you used..$_GET or $_POST foreach($checkbox as $value){ $sql = "INSERT INTO tbl_name VALUES('$value')"; //insert correct values.. $query = mysql_query($sql) or trigger_error("Mysql Error:".mysql_error(),E_USER_ERROR); }
-
i'm not going to start reading the code until I know what error(s) you are receiving..
-
I do not have time right now to write a custom function since I am at work... but here's a link to start you out http://www.webmasterworld.com/forum91/1863.htm also, google something like 'multiple forms one submit button' or something along the lines of that
-
okay I see what you are saying, what I would do is have one submit button that grabs all of the data, have conditions set (if/else statements) set for each individual form....if no data is grabbed from a specific form, don't do anything with that form, if data is grabbed from a form, store that specific data in your database. Now if you decide to use a submit button for each form and don't want the page to refresh after the user submits...which is understandable, you can use either AJAX or jquery to submit the form, handle the data on the server, and output a response without refreshing the page...so that's an option here
-
true, i missed this originally, in order for the mail function to work, a from header must be specified, either in the header parameter or in the php.ini file. Your first step will be to add that to the function
-
i'm not exactly sure what you are asking here, are you asking how to get it to work if someone wants more then one host? can you give a quick example
-
that is not always true, you also have to be preemptive when working with regex...the code that you posted will not allow for spaces in between "action" and "=" in both the id and the action of the form, which is acceptable and valid syntax..
-
$subject = "<form action ='test.php' name='test'>"; $pattern = '~action\s*=\s*\"(\w+\.[php|asp|html|htm])\"~'; preg_match($pattern, $subject, $matches); print_r($matches);
-
it depends on how the OP wants the data displayed, perhaps I am misunderstanding the goal here
-
since the number of fields are the same in each table, you can actually use a Union here