116 Posted Topics

Member Avatar for Angeline5

Hi there, you could use a regular for loop like this: [code=php] $max = ceil(count($Forms,$sharedForms); for ($i = 0; $i < $max; $i++) { $outstring1.= " $(\"#shareform".$Forms[$i]['Form']['id']."\").hide(); $(\".Share".$Forms[$i]['Form']['id']."\").click(function(){ $(\"#shareform".$Forms[$i]['Form']['id']."\").toggle(\"show\"); });"; $outstring2.= " $(\"#shareform".$sharedForms[$i]['Form']['id']."\").hide(); $(\".Share".$sharedForms[$i]['Form']['id']."\").click(function(){ $(\"#shareform".$sharedForms[$i]['Form']['id']."\").toggle(\"show\"); });"; } echo $outstring1; echo $outstring2; [/code]

Member Avatar for Menster
0
303
Member Avatar for nostalgia149

Um a little skewed. Heres the breakdown: You have a number of "SUPER GLOBALS" in php which are superglobals because they can be accessed from anywhere in the scope of your script. The 3 i'm gonna focus on here are $_POST, $_GET, and $_REQUEST because they are relevant to your …

Member Avatar for nostalgia149
0
111
Member Avatar for ROTC89

Hi there, Do you mean you want to append ".sql" to the table name? If thats the case I have no idea short of recreating the table with the adjusted name. But why would you want this?

Member Avatar for Kailash12
0
104
Member Avatar for cab_driver

Hi there, One option you could look into is using php to resize all your images according to a client's native resolution which you would have to store in a cookie/session and get initially with javascript (or by the user following a link specific to their resolution). Be aware though …

Member Avatar for MidiMagic
0
96
Member Avatar for The Dude

Take a look at [URL="http://www.pagetutor.com/trillion/index.html"]this[/URL]

Member Avatar for The Dude
0
130
Member Avatar for xuexue

The only way you can do that is with computations, rest easy though, the computer takes care of the actual math for you: [code=php] $bytes = $_FILES['my_file']['size']; //Size of file in bytes $kbytes = $bytes / 1024; $mbytes = $kbytes / 1024; //Size in Mega bytes [/code] Nice and simple …

Member Avatar for xuexue
0
80
Member Avatar for jacintamba

Hi there, I'm not sure if what you're asking for is possible. The way I understand it to work is if you take a page (index.html) and reload it, it also reloads all of it's child elements including the iframe and the page to which the iframe is linked. A …

Member Avatar for jacintamba
0
83
Member Avatar for gmchun83

By the looks of things, you aren't connecting to your database correctly, try the following: Replace your db connection initialisation with the following [code=php] mysql_connect(localhost,$username,$password) or die( "Unable to connect to database"); mysql_select_db($database) or die( "Unable to select database"); [/code] I just removed the @ from the second line since …

Member Avatar for Menster
0
105
Member Avatar for Menster

Hi there, I would have done this earlier if I new this forum existed. But I didn't, so here it is. My name is Duncan, i'm a php/javascript/mysql developer in sunny South Africa, and I joined DaniWeb in thanks to all of the various forums and posts that Google found …

0
48
Member Avatar for xuexue
Member Avatar for xuexue
0
1K
Member Avatar for Menster

Hi there peoples of DaniWeb, Does anybody know how to authenticate that a request is coming to one of my pages from a specific server and not from any random script. Many thanks,

Member Avatar for Menster
0
131
Member Avatar for whiteyoh

Hi there, The error that you are getting indicates that your query is either invalid or the result set that it returns is empty. Just double check that your SQL statement run correctly on your phpMyAdmin or other SQL command panel, and that there is data in the database. Additionally, …

Member Avatar for whiteyoh
0
75
Member Avatar for Menster

Hi there, Does anyone know how to force Internet Explorer to refresh it's results from an AJAX call? I might be doing something wrong but here is my problem: I use Ajax to present a form containing price values of a product from a database, where they are presented in …

Member Avatar for prime1999
0
139
Member Avatar for BabyEyes

Hi there, If you ever have any questions about php the first place you should look is [URL="http://www.php.net"]http://www.php.net[/URL] and then [URL="http://www.w3schools.com"]http://www.w3schools.com[/URL]. These are probably the 2 best resources available for people trying to learn php. So take a look there before posting your assignments on forums :)

Member Avatar for Menster
0
171
Member Avatar for tulipputih

Hi there, from the past couple of posts, you guys are on the right track, it just seems that no-one remembered to close the anchor tag properly, it should be like this: [CODE] # <?php # for ($i =0; $i < $ValuenumtableChildren; $i++) # { # echo '<a href="viewingdetails.php?name='.$Valuechild[$i].'">LINK TEXT …

Member Avatar for tulipputih
0
4K
Member Avatar for bjg5858

Hi there, Is "product name" the name of the input box & post variable or is that the value of the variable/text in the input box?

Member Avatar for bjg5858
0
106
Member Avatar for DaveyMoyes

Hi there, What you could try is changing your link from instead of having an href attribute, make an onclick attribute and put that line of javascript from your popup.php file into the onclick's value without the script tags etc. Example: <a onclick='window.open('Contact-Sms-Centre.php','new_window1','status=1,scrollbars=0,resizable=0,menu=no,left=450,top=2 ....) '>Contact</a> I'm not sure if this …

Member Avatar for DaveyMoyes
0
397
Member Avatar for Magic8Computing

Indeed it is: [code=php] <? echo "<a href=\"YOUR_LINK_HERE\" >LINK_TITLE_HERE</a>"; ?> [/code] P.s: Don't forget the backslashes for the 'href' attribute, if you leave them out the php won't work.

Member Avatar for diafol
0
168
Member Avatar for whiteyoh

Hi there, You don't actually have a problem statement in your post, so I'm not really sure where you are going wrong. But, I notice that after querying the database at the top of the file, you don't do anything with the $row variable, which is why you aren't seeing …

Member Avatar for Josh Connerty
0
118
Member Avatar for mundetas

Hi there, This is definitely a javascript problem, not pHp. Please check my response on the Javascript forum.

Member Avatar for mundetas
0
69
Member Avatar for faizt1

Hi there, For one, some browsers will have a problem with multiple forms with the same name, I would go with the $_GET route. Instead of outputting the data in forms like you have done, just display the results normally and where you currently have your submit button, replace it …

Member Avatar for faizt1
0
96
Member Avatar for php_noob

I would recommend using XAMPP, however, it uses MySQL not MS SQL. Im not even sure if you can get apache and php to work with MS SQL (well, you probably can but I'll guarantee it's more effort than it is worth). XAMPP is an all-in-one wunderkind php development kit. …

Member Avatar for php_noob
0
305
Member Avatar for Ancient Dragon

Pfft, hearts is for Kids. Minesweeper, now thats a real mans game ;P

Member Avatar for MosaicFuneral
0
156
Member Avatar for mundetas

Hi there, If you don't want to display two pages, try using "window.location", instead of "window.open".

Member Avatar for essential
0
93
Member Avatar for tones1986

Hi there tones, Just append this to your query: [code=sql] ORDER BY O.ORDER_DATE DESC LIMIT 1 [/code]

Member Avatar for tones1986
0
98
Member Avatar for ayesha789

Hi there, The logic behind the process is this: First the user fills in the registration form & submits it Then your site must process the submission & create a temporary/inactive user profile for the registrant, at the same time, your site must send a mail to the new registrant …

Member Avatar for ayesha789
0
166
Member Avatar for 83apple

Hi there, Where exactly is the problem? Whats happening thats not supposed to or vice versa?

Member Avatar for jcacquiescent27
0
127
Member Avatar for mbabaali

You need to retrieve your results from your $stat3 variable just like you are doing, except in the square brackets the word (key) must be enclosed in quote marks, eg: $stat3[[COLOR="Red"]'[/COLOR]sex[COLOR="Red"]'[/COLOR]]

Member Avatar for mbabaali
0
98
Member Avatar for Venom Rush

Hi there, I assume your code snippet is from the fruit.php file, if thats the case then it is quite simple to do what (I think) you need, in fact you have already given it yourself: basename($_SERVER['REQUEST_URI']) will give the url sent to the server minus all of the folder …

Member Avatar for Venom Rush
0
2K
Member Avatar for dwdata

The only error i can see in your posted code is that you don't echo the variable $id_event for the value of it's hidden field, you just put the name there as html, but i don't think that would stop your page from being properly interpreted. Could you put the …

Member Avatar for Menster
0
141
Member Avatar for Lolalola

Are you certain that your session is always started when you try to destroy it?

Member Avatar for Lolalola
0
115
Member Avatar for rickya100

Hi there, Once the xpath function has run, you can treat the $topost variable as an array. So I'd recommend taking a look at the output of print_r($topost) and then make note of the ids of the elements that you want and extract them like that. That is if your …

Member Avatar for rickya100
0
161
Member Avatar for vishalkhialani

Hi there, In an associative array the symbol '=>' indicates a key-value pair, ie: 'key' => 'value', this means that you can access an element of the array with it's named key like: $array['key'] will return the value of 'value'

Member Avatar for vishalkhialani
0
132
Member Avatar for dimplemodi

Hi there, What exactly were you doing when it happened? It sounds more like apache failed than your code though, unless you are actually manipulating threads manually.

Member Avatar for dimplemodi
0
96
Member Avatar for NoID

I'm not sure what you need: the HTML form, the SQL statement or the PHP to run it? or do you just want to pass?

Member Avatar for sikka_varun
0
128
Member Avatar for Jintu

Hi there, I would use the if/else approach originally suggested without adding the full mark for an uninitialised POST variable. Additionally keep track of how much each of the tests is supposed to count (eg If you would multiply a mark by 0.05 to form part of the final mark, …

Member Avatar for Jintu
0
3K
Member Avatar for dmotah

Hi there, Myself and a buddy at work were dumbfounded by a similar situation not too long ago. Our current working theory is that the GD library's imagecreate****** methods first turn any image into a bitmap, could be wrong but it explains all the extra memory usage. Anycase, your best …

Member Avatar for Menster
0
337
Member Avatar for Menster

If you haven't heard the rumors (press releases), Google plans to release it's own OS by the end of 2010, according to the news it's going to be aimed at smaller devices (laptops/pdas etc.) and is going to be focussed on web-based functionality including the ability for people to write …

Member Avatar for rishabhv
0
297
Member Avatar for coolest_987

Hi there, Unfortunately the answer is simpler than it seems: you are either using the incorrect password or username or both. I think the problem is your password, default for mysql is "" (nothing).

Member Avatar for Josh Connerty
0
94
Member Avatar for stevenpetersen

Hi there, not really sure what you are trying to do, your diagram isn't very informative. Please post some more specific info, thanks

Member Avatar for Josh Connerty
0
238
Member Avatar for whiteyoh

Hi there, I think i've spotted your problem. [QUOTE=whiteyoh;912697] [code=php] <? // Select all data records in table "name_list" and put them into $result. $result=mysql_query("SELECT * from `indexinfo` WHERE id = '1'"); //store the queried cell in the variable //named $result $result = mysql_query($sql_query); [/code][/QUOTE] After you run the initial …

Member Avatar for jcacquiescent27
0
263
Member Avatar for cooweck

Hi there, When I've had to keep an arbitrarily long set of parameters in a database in the past, I usually implode the array into a string, seperating the values with tildes and then store that string in a column of type text. I think that's what you're talking about …

Member Avatar for Menster
0
74
Member Avatar for justM

Hi there, I've just taken a brief scan through the code and nothing major stands out. What problems arise when you try to run the code?

Member Avatar for justM
0
70
Member Avatar for goldy736

Hi there If you just want to keep track of how long a guy was on a page simply use the following, at the top of your php page: [code=php] $time = time(); $_SESSION['time_started'] = $time; [/code] Which stores the time (as a UNIX timestamp) that the page was loaded …

Member Avatar for Menster
0
3K
Member Avatar for Menster

Whats the general opinion here: Are all programmers stoners? (If my colloquialism is lost across borders i'm talking about marijuana) Some two-bit sales person came and chirped me the other day that sales will always be the more powerful branch of the industry because they're the deal makers, they're more …

Member Avatar for Menster
0
142
Member Avatar for Devendra1

Software to run php: XAMPP (if you are on a Windows based pc) Sofware to write php: Netbeans PHP is free (as far as I can tell) but phpEd from nuSphere is way awesomer if you're willing to buy a license. Best Place to Learn PHP: The basics at [URL="http://www.w3schools.com"]http://www.w3schools.com[/URL] …

Member Avatar for jbennet
0
345
Member Avatar for Salem

Smiling is over-rated. [i]Especially[/i] if you are staring at a computer screen, what are you trying to do? Re-assure it? I got into programming so that I wouldn't have to deal with people and by extension of that be nice to them for no reason

Member Avatar for MosaicFuneral
0
176
Member Avatar for absk

Hi there, Give this a bash, be warned though I haven't tested it yet put if you post up your text file I'd be more than happy to: [code=php] $assoc_array = array('a'=>array(),'b'=>array(),'c'=>array(),'d'=>array(),'e'=>array(),'f'=>array(), 'g'=>array(),'h'=>array(),'i'=>array(),'j'=>array(),'k'=>array(),'l'=>array(), 'm'=>array(),'n'=>array(),'o'=>array(),'p'=>array(),'q'=>array(),'r'=>array(), 's'=>array(),'t'=>array(),'u'=>array(),'v'=>array(),'w'=>array(),'x'=>array(), 'y'=>array(),'z'=>array()); $filearr = file('myfile.txt'); foreach ($filearr as $line) { $thisLine = split(" ",$line); foreach ($thisLine …

Member Avatar for ShawnCplus
0
156
Member Avatar for yes123

Hi there, You're gonna have to give us a little more info than that, such as what your OS is, what phone you have what are you gonna connect your pc to your phone with, what you are going to connect your phone to the internet with etc.

Member Avatar for ithelp
0
23
Member Avatar for coubury

Hi there, The problem that you are most likely facing is that the result set your database is returning is null. Please checkout [URL="http://www.daniweb.com/forums/thread201892.html"]http://www.daniweb.com/forums/thread201892.html[/URL], it should set you straight.

Member Avatar for Menster
0
228

The End.