188 Posted Topics
Re: [CODE] function get_category($name) { // get the first letter of the name passed in. $first_letter = substr($name,0,1); // normalize it, in this case lets make them all lowercase. $lowercase = strtolower($first_letter); // I was going to make an array of categories, but this will do the job... $category = ''; … | |
Re: your code: [CODE] $res = "select ad.firstname, ad.lastname, ad.address, ad.city, ad.state, ad.zipcode, ad.dhtmlgoodies_category, ad.dhtmlgoodies_subcategory, ad.caryear, ad.customerid, ad.servicedesc, aj.email, aj.areacode, aj.phoneprefix, ad.clientID, aj.phonesufix, aj.cellareacode, aj.cellprefix, aj.cellsufix, aj.commentonclient from additional_cars as ad, ajax_client as aj where ad.clientID='$clientId' group by ad.clientID"; if($inf = mysql_fetch_array($res)){ ... [/CODE] 2 questions what is $inf, and where … | |
Re: Have you tried to pass the variables to your function? [CODE] // somewhere you are calling this function, presumably with $i and $f2 already set. function goThroughDays() { ... } // so change your function call and pass your variables into it. function goThroughDays($i,$f2) { // then $i and $f2 … | |
Re: Expanding on tnjiric response: [CODE] add javascript function to top of page somewhere function updateAll(id) { document.form1.setAttribute("action",'submitAction.php?action=updateAll'); document.form1.submit(); } line 46 or so in your code: <td width="67" bgcolor="steelblue" height="15" style="font-size: 11" align="center"><b><font face="Arial">Update</font></b></td> line 101 or so in your code (after edit button) <td height="5" width="64" ><input type="button" style="width:100%" … | |
![]() | Re: right after your beginning php tag, line 2 call session start. [CODE] session_start(); [/CODE] |
Re: Your syntax on your checkbox inputs are incorrect. Try this on your form code for each of the checkbox fields: [CODE] <input type="checkbox" name="DomaineInteret[]" value="25eme" /> <input type="checkbox" name="DomaineInteret[]" value="BingoFreinds" /> // and so on, the checkboxes you have are part of a 'group' and therefore you want // the … | |
Re: [CODE] //change line 20 like pritaeas suggested. $rows = mysql_numrows($characters); //to $rows = mysql_numrows($chars); [/CODE] | |
![]() | Re: assuming FName is a string, your query needs to reflect that. change this: [CODE] $queue = "SELECT * FROM employer WHERE FName = $name"; [/CODE] to this: [CODE] // wrap $name in tick marks '$name' $queue = "SELECT * FROM employer WHERE FName = '$name'"; [/CODE] ![]() |
Re: what exactly are you trying to compare. I'm more familiar with mysql but mysqli can't be that much different. are you trying to compare each result row with what is being iterated in that set? perhaps you just need a better query. or could dump all your data into an … | |
Re: Line 15 of your code: [CODE]$type = $_FILES['myfile'] ['type'];[/CODE] needs to change to: [CODE]$type = $_FILES['myfile']['type'];[/CODE] with no space between "['myfile']['type']" Other than that your code worked for me. | |
Re: First off, you have no 'ids' on you page. var a= document.getElementById('unitprice[this]'); var b= document.getElementById('qty[this]'); you need to add id elements to your input tags or switch the 'ElementById' call to be getElementByTagName('name') like: <input name='unitprice' id='unitprice' value=''> also, I find it very strange that everything is named with []? … | |
Re: [CODE]Send you data to a function right before you email it. assuming you have validation step 1, and then email step 2. try this: // create your function function format_html_email($_POST){ $html =''; $i=0; // the following creates a two column table; $html .= "<table> \n"; foreach($_POST as $key => $value) … | |
Re: // you could have a function to read your user data or for your main html to be spit out. [CODE]function format_html_email($user){ $html =''; // you can 'customize' each email with specific data... $html = "Thanks again " . $user->get_username() . " \n"; $html .= "This is a chain email … | |
Re: you can try something like this: [CODE]$handle = fopen($_FILES['file']['tmp_name'], "r"); while(!feof($handle)) { $data = fgets($handle); $listing = explode(",", $data); $id = $listing[0]; $name=$listing[1]; // this is second column data. $telephone = $listing[2]; $email = $listing[3]; echo "id = " . $id . "<br />"; echo "name = " . $name … | |
Re: pritaeas is right on this one. I think you need to better explain what you are trying to do. you simply need to pass each id into a function you do not need a dynamic 'function' generator to handle your data. ![]() | |
Re: 1) I can't believe what this product can do. Is breaking on the ' mark in can't. your query is seeing this and breaking, nothing would be seen in your query after that ' in cant, and the rest would be dropped resulting in an error. To fix this you … | |
Re: If your $_POST variable is available to your function: $selected_radio = $_POST['posk_options[radio_group_two]']; | |
Re: You can try [CODE]$clean_string = str_replace("'","",$search_string);[/CODE] parameter 1, is what you are searching for, param 2 is what to replace it with, (in this case replace a single ' with nothing) and param 3 is the string you are searching through. | |
Re: You can try ini_set('max_execution_time', 0); at the top of your script. 0 = forever. and just a thought... Depending on your query and what type of data you are pulling, can you precompile some of the xml data that you want? As in, run the queries and store the data, … | |
Re: I see nothing wrong with having the index page handled this way, but I would not have every page in the site try to decide what page to display off of get variables. | |
Re: That is not proper image code. <img src="image.gif" /> and what is abc.php. what is the code on that page? your question does not make sense. where is your readfile() code? | |
Re: There is no real good reason to md5 your filename. That would not avoid any malicious uploads, so, if you wanted you could remove the md5 calls. Also you are calling resize and then createFile with an md5'd 'tempname'. I would make the call something like $large_file = $image->createFile("large_".$targetFile); How … | |
Re: try $message = urlencode($message); then tack it on the end of your url string. | |
Re: I didn't look at the thread, but... I don't see where you are using anything from your sql statements. You need to add &subid=$subid where $subid is the subject id pulled from your database at the end of each of your links. so when your link posts back to the … | |
Re: Of course, there is always more than one solution, but, if there is nothing else to do between step 1 and step 2, just incorporate step 2 in the while loop of step 1. so code 1: while ($row = mysql_fetch_array($r, MYSQL_ASSOC)) { $clientID=$row['clientID']; $get_swork = "select servicearea, date, customerid, … | |
Re: since your script is reading in the id of the records when you are creating your form / table, why not pass in the id in either a hidden field, or attach it in your drop down list. you can make the 'value' of your select list be $id-'status' while … | |
Re: Do you have command line access? try: mysql -u username -ppassword database_name < database.sql The database needs to already be created in mysql. | |
Re: perhaps if you move your if (isset post[claimitem]) outside all of your conditianal if statements. put it at the top of your page so it is eval'd first, if a posted form value comes from that page. | |
Re: If it is approve or deny only don't use checkboxes use radio buttons for you input values. | |
Re: tizag has an excellent write up on ajax. [url]http://www.tizag.com/ajaxTutorial/ajax-mysql-database.php[/url] that said I made you a little function ajax, it currently uses 3 pages. input form page: [CODE]<script language="javascript" type="text/javascript"> <!-- //Browser Support Code function ajaxFunction(username,loginid,activated){ var ajaxRequest; // The variable that makes Ajax possible! var u = username; var li … | |
Re: you can try curl: $URL = 'https://spreadsheets0.google.com/spr...d=1&output=csv'; $ch = curl_init(); // initialize the cURL session curl_setopt($ch, CURLOPT_URL, $URL); // tell it which URL to go to (minus the parameters) curl_setopt($ch, CURLOPT_GET, 1); // tell it that you want to send an HTTP GET request curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $ret_value = curl_exec … | |
Re: There are a couple of ways to get the result you want. first you can alter your query, I'm not sure if you want to cut off all negative numbers, before your 'group by' statement and after (79) you should be able to add: and 90 - DATEDIFF(CURDATE(),date) > 0 … | |
Re: sure it's possible and I don't think it's all that hard to do, what data specifically are you wanting to track? what kind of database do you have, I am familiar with mysql. Are those scores (60 second intervals) available to php code? Do you want to update every 60 … | |
Re: I don't think it's a session error, it is a problem with the query itself. "No mention of 'aneura' is made at all. Furthermore, all species names are made from two words (not one). The current correct species name actually is Acacia aneura, so the error has to be related … | |
Re: use $_SERVER['PHP_SELF'] The filename of the currently executing script, relative to the document root. For instance, $_SERVER['PHP_SELF'] in a script at the address [url]http://example.com/test.php/foo.bar[/url] would be /test.php/foo.bar. alternatively you could use $_SERVER['REQUEST_URI'] and pass in an update to the member_log table or on the initial insert | |
Re: It's all about design, and you have a lot to think about. Don't pass the variable in a link. Since you know who the 'manager' is and they are presumably stored on a database somewhere, when you assign them a link to pass out, store that link in a table, … | |
Re: 1) its possible that exec is limited to only the directory that you are working out of. or use the full path to the file that you want to call with exec. why are you using exec in this case anyway? 2) drop_post.php creates the links to delete.php and passes … | |
Re: connection code here mysql_query('truncate table a'); mysql_query('truncate table b'); mysql_query('truncate table c'); mysql_query('drop table x from databasename'); disconnect |
The End.