188 Posted Topics

Member Avatar for keskor

[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 = ''; …

Member Avatar for ddymacek
0
107
Member Avatar for mbarandao

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 …

Member Avatar for ddymacek
0
438
Member Avatar for Rahul1996

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 …

Member Avatar for Rahul1996
0
130
Member Avatar for chaychie

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%" …

Member Avatar for vaultdweller123
0
122
Member Avatar for megachip04

right after your beginning php tag, line 2 call session start. [CODE] session_start(); [/CODE]

Member Avatar for ddymacek
0
8K
Member Avatar for riseguim

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 …

Member Avatar for riseguim
0
206
Member Avatar for Isti666

[CODE] //change line 20 like pritaeas suggested. $rows = mysql_numrows($characters); //to $rows = mysql_numrows($chars); [/CODE]

Member Avatar for leakbali
0
106
Member Avatar for Ralphael

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]

Member Avatar for Ralphael
0
108
Member Avatar for daz_omega

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 …

Member Avatar for daz_omega
0
1K
Member Avatar for Alternativeguy

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.

Member Avatar for ddymacek
0
99
Member Avatar for Nollyvenon

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 []? …

Member Avatar for utpal23
0
4K
Member Avatar for sethm

[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) …

Member Avatar for sethm
0
143
Member Avatar for jacob21

// 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 …

Member Avatar for rajeesh_rsn
0
205
Member Avatar for cliffcc

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 …

Member Avatar for cliffcc
0
3K
Member Avatar for jakizak

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.

Member Avatar for diafol
0
116
Member Avatar for tonyl09

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 …

Member Avatar for tonyl09
0
106
Member Avatar for Acids

If your $_POST variable is available to your function: $selected_radio = $_POST['posk_options[radio_group_two]'];

Member Avatar for ddymacek
0
131
Member Avatar for lloydsbackyard

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.

Member Avatar for lloydsbackyard
0
952
Member Avatar for veledrom

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, …

Member Avatar for veledrom
0
90
Member Avatar for mikeflash

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.

Member Avatar for pritaeas
0
142
Member Avatar for stranger_on_way

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?

Member Avatar for ddymacek
0
97
Member Avatar for phaedrusGhost

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 …

Member Avatar for phaedrusGhost
0
119
Member Avatar for jacob21

try $message = urlencode($message); then tack it on the end of your url string.

Member Avatar for ddymacek
0
226
Member Avatar for Jhon E

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 …

Member Avatar for ddymacek
0
125
Member Avatar for mbarandao

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, …

Member Avatar for mbarandao
0
411
Member Avatar for pickett65

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 …

Member Avatar for pickett65
0
144
Member Avatar for cjohnweb

Do you have command line access? try: mysql -u username -ppassword database_name < database.sql The database needs to already be created in mysql.

Member Avatar for cjohnweb
0
292
Member Avatar for Tenaciousmug

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.

Member Avatar for ddymacek
0
201
Member Avatar for aphpdeveloper

If it is approve or deny only don't use checkboxes use radio buttons for you input values.

Member Avatar for aphpdeveloper
1
263
Member Avatar for ericxye

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 …

Member Avatar for ericxye
0
209
Member Avatar for lifeworks

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 …

Member Avatar for almostbob
0
195
Member Avatar for mbarandao

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 …

Member Avatar for mbarandao
0
104
Member Avatar for dodgeitorelse

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 …

Member Avatar for ddymacek
0
91
Member Avatar for billmudry

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 …

Member Avatar for billmudry
0
155
Member Avatar for ayesha789

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

Member Avatar for ayesha789
0
176
Member Avatar for scorpio222

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, …

Member Avatar for scorpio222
0
87
Member Avatar for dan1992

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 …

Member Avatar for dan1992
0
81
Member Avatar for gazzy1

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

Member Avatar for ddymacek
0
67

The End.