546 Posted Topics

Member Avatar for Sanchixx

Set the proper height to DIV. #comment {height: 300px; overflow: auto} Will show scroll bar when the content overflow of parent (i.e, more than 300px height).

Member Avatar for ko ko
0
139
Member Avatar for ibakir

What's the problem ? The above PHP codes are not working or are you getting errors? Showing your entire codes could not help us to says where the problem is. You should just posted the part of the code what you think that it might not work.

Member Avatar for ibakir
0
692
Member Avatar for devindamenuka

I'm not clear what you're saying. You want to show the country flag when the country was changed ? Can't it be done with Javascript or jQuery with 'onchange' event to that country selector ? Your question rarely related with the client-side, not server-side.

Member Avatar for devindamenuka
0
168
Member Avatar for wju2004

Use **mysql_real_escape()** function to filter the input rather than str_replace(). Or use [PDO](http://php.net/manual/en/book.pdo.php).

Member Avatar for wju2004
0
228
Member Avatar for MarielaMontaldo

Probably, you may have **XMLHTTPRequest** problem. Are you sure **crearXMLHttpRequest()** works on IE and you get new **XMLHTTPRequest** ? Should try what @pritaeas said.

Member Avatar for ko ko
0
267
Member Avatar for jackbauer24

Remove your previous Apache installation is better. Otherwise, you may have port conflict which XAMPP/WAMPP use port 80 for HTTP and your previous Apache service also. So, uninstall your previous Apache and install XAMPP/WAMPP package. They already built-in with PHP, Apache, MySQL, FTP and so on. Note that if your …

Member Avatar for jackbauer24
0
284
Member Avatar for brainfo

Which "**index.php**" are you referring ? Admin "**index.php**" or front-end "**index.php**" ? You should check [here](http://codex.wordpress.org/Function_Reference) first.

Member Avatar for ko ko
0
177
Member Avatar for drjay1627

**issset()** don't check for null. It just check the variable has already set or not. If the variable already defined or set, it return true, and return false otherwise. Your code will always work every time the form has submitted, because it just send empty value (it is not null) …

Member Avatar for ko ko
0
153
Member Avatar for microbert

You must use HEADER with proper MIME type to prompt the download immediately when you click the download button. The above @tyson567 methods just send you the new page where the image located, it'll not prompt you to download the image when you reached that page. [Here](http://www.apptools.com/phptools/force-download.php) is the example …

Member Avatar for ko ko
0
252
Member Avatar for AjixPreston

What mean "**I mean it looks good, but It's erroring up...?**" You don't even check your code that it does work or not ? Post what you're trying with that codes and what problem you're getting.

Member Avatar for scarcella
0
113
Member Avatar for ash55

> SELECT **contact_financial_invoiceamount-contact_financial_payment** AS outstanding You must be missing comma between each field names which was bold. You should separate the query string and function. Here is readable format and less errors. > $sql = "SELECT contact_financial_invoice, amount-contact, financial_payment AS outstanding FROM contacts WHERE contact_id = ".$_GET['id']; > $result = …

Member Avatar for jmichae3
0
351
Member Avatar for divyakrishnan

foreach ($_POST as $key => $value) { echo $value; } What's still wrong ? The above method should work.

Member Avatar for ko ko
0
2K
Member Avatar for newbie26
Member Avatar for subrata_ushasi

Post the error what you're getting. Actually, you need web server and MySQL for installing Magneto.

Member Avatar for veedeoo
0
382
Member Avatar for aianne

Only submit button should be identified for one form. No matter how much submit buttons are you using within the same form, they've only submission of that form. Try what @Glider Pilot mentioned above.

Member Avatar for aianne
0
880
Member Avatar for whit89

We need further information. Also, it is better if you have well-known about DOM for complete this case.

Member Avatar for whit89
0
130
Member Avatar for tubesnube
Member Avatar for Biiim
0
304
Member Avatar for h2so4_2003

You're using POST method, not GET. How you receive that "action" $_GET['action'] will not get any value from the form. It should be $_POST['action'];

Member Avatar for ko ko
0
2K
Member Avatar for Clanstrom

[CODE]<?php mysql_connect("localhost", "root", "test") or die(mysql_error()); echo "Connected to MySQL<br />"; mysql_select_db("testdb") or die(mysql_error()); ?> <?php @$username = $_POST['name']; @$country = $_POST['country']; ?>[/CODE] Put this in form.php, remove [B]include(form.php)[/B] and try. If you want to show the form again. Redirect to that page when the INSERT finished with custom message, …

Member Avatar for Clanstrom
0
241
Member Avatar for filipgothic

There is no one who write the code for you. Post what you've and what you got. We'll point you the correct way.

Member Avatar for filipgothic
0
428
Member Avatar for FALL3N

Why you're trying to pass the value as function argument. If you know the ID of the field, then, you can easily get the value within the function. Example: [code] function goNow(){ var input = document.getElementById('theName').value; // do your statement } [/code] Binding event that function without argument [B]onClick="goNow()"[/B] It …

Member Avatar for FALL3N
0
215
Member Avatar for srdva59

I've no idea, how you're going to be complex to the easy one. If you've configuration like such. Then, you can simply change their value directly in that file as @ardav mentioned.

Member Avatar for cigoL..:)
0
73
Member Avatar for jpknoob
Member Avatar for tqmd1
Member Avatar for mombasageek

[code] function verify(){ var image = new Image(); if(!document.getElementById('jim1').value().match('/[0-9]/')){ image.src = 'path/success-image.gif'; document.getElementById('jim3').appendChild(image); } else{ image.src = 'path/error-image.gif'; document.getElementById('jim3').appendChild(image); alert('Error !'); } return false; // this line will prevent the form submitted } [/code] Attach the above function to your button with onclick event. Note that it was not tested …

Member Avatar for ko ko
0
138
Member Avatar for yanwick

[CODE=php]<?php phpinfo(); ?>[/CODE] What does it return ? Also, don't put the bracket with [B]echo[/B] statement. [code=php] <?php echo "Hello"; ?> [/code] It should be.

Member Avatar for yanwick
0
234
Member Avatar for rubai

@vaultdweller123, if you're W3Schools fun. Then, check this [URL="http://w3fools.com/"]http://w3fools.com/[/URL] @rubai, you should go to [URL="http://www.php.net/manual/en/index.php"]php.net[/URL] from novice to pro.

Member Avatar for cigoL..:)
0
314
Member Avatar for theonlylos

[CODE=php]if(!function_exists('render')){ //put your render function function render(){ } }[/CODE] Try above. Anyway, what is the PHP version ? And check the system requirements for Drupal 7.12 to ensure it is compatible with your PHP version.

Member Avatar for ko ko
0
212
Member Avatar for eman neercs

You need to wrap FORM. Otherwise, use GET method to pass those values with ((param1=value1&param2=value2) separating ampersand between them) via URL to the page you want to process. Then, you can retrieve $_GET['param1'], $_GET['param2']. But, this is stupid method and you need to do some javascript tricks. It is non-sense …

Member Avatar for ko ko
0
133
Member Avatar for nova37

[B]mysql_fetch_assoc($w3db)[/B], change [B][COLOR="Red"]$w3db[/COLOR] [/B] to [B]$w3[/B] or use @ardav method. It is better way.

Member Avatar for ko ko
0
106
Member Avatar for andrewliu

Post your codes. We can't find the problem and help you without seeing any codes.

Member Avatar for christinamarie1
0
653
Member Avatar for xiiopao

Vibhadevit is right. You must use array to store for multiple checkbox values those are coming by one group. If so, you must repeat the query to retrieve the multiple values and enter to database. Vibhadevit has shown the pretty explaining with example above. If not separate the group with …

Member Avatar for tashi lhendup
0
3K
Member Avatar for leechyeah

You might have wrong db structure. Separate the user table and order table. User table should has ID numbers, names and ordered. Also, order table should has ID numbers, names and quantities. For example, if one user click cheese to order, then update the ordered field (insert the ID number …

Member Avatar for leechyeah
0
394
Member Avatar for dan420

[CODE][B]$qtyProd= $_POST['qtySelectProd'];[/B][/CODE] - Where is [B]qtySelectProd[/B] in the form ? I don't see that field in the form. - [B]qtySelectSer[/B], you have only [B]qty[/B] value [B]qtySelectSer[/B], check your HTML option value within the loop. [QUOTE]for ($n=0; $n<11; $n++){ echo "<option value=[B][COLOR="Red"]qty[/COLOR][/B]>".$n."</option>"; }[/QUOTE]

Member Avatar for diafol
0
170
Member Avatar for morrisproject
Member Avatar for jcarbillon
Member Avatar for saybabs

Check [URL="http://www.php.net/manual/en/timezones.africa.php"]this[/URL].

Member Avatar for diafol
0
358
Member Avatar for aaloo

Try this: [code=php] if(isset($_POST['firstName'] && $_POST['lastName'])) { $text=$_POST['firstName']." ".$_POST['lastName']; $to="anubhavjhalani09@gmail.com"; $subject="Message from php"; //data insert into database $sql="INSERT INTO entries (contents) VALUES ('$text')"; echo $text; } [/code]

Member Avatar for Biiim
0
3K
Member Avatar for sharathg.satya

[B]select * from [COLOR="Red"]emp1[/COLOR][/B], make sure that table name is correct, emp with 1 or l ?

Member Avatar for pritaeas
0
164
Member Avatar for jacksantho

Are you concatenating the string ? I'm not sure what's before of the string you posted above. If you've already used echo for the above line, [B]echo "selected"[/B] was the problem. You cannot use [B]echo[/B] within echo function. Try with below: [code=php] if(trim($_POST['ctype2'])=="C") "selected='selected'" [/code]

Member Avatar for bijoy340
0
222
Member Avatar for BenzZz

Did you include db_connection.inc file into db_connect.inc ? Perhaps, like below: [code=php] <?php include('db_connection.inc'); function db_connect () { include'db_connection.inc'; $dbh = new PDO("mysql:host=127.0.0.1;$database", $user, $password); return ($dbh); } ?> [/code]

Member Avatar for Stefano Mtangoo
0
322
Member Avatar for davy_yg
Member Avatar for luweegee

Try this: [code=php] <?php if (isset($_SESSION['uid']) && $_SESSION['uid']) { echo "You are already logged in, if you wish to log out, please <a href=\"./logout.php\">click here</a>!\n"; } else { if (isset($_POST['submit'])) { $user = (isset($_POST['username'])) ? $_POST['username'] : ''; $pass = (isset($_POST['password'])) ? $_POST['password'] : ''; if($user != '' && $pass …

Member Avatar for ko ko
0
266
Member Avatar for noahshoa2

Here is example: [code] <html> <head> <title>What db is it going to ?</title> </head> <body> <?php if(isset($_POST['submit'])){ $name = $_POST['Exaxmple']; echo "<p>It is going to database <b>db_".$name."</b></p>"; } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <input type="hidden" name="Example"> <input type="submit" value="What db is it going to?" name="submit" /> </form> </body> …

Member Avatar for zubaircs
0
115
Member Avatar for roottybrian

First, check your mysql server is running or not like @ardav mentioned? Second, how are you using mysql_connect() function in your php? mysql_connect() needs three arguments (host, username, password). Check the above facts and post again if your problem still keep going.

Member Avatar for roottybrian
0
98
Member Avatar for Dragan.
Member Avatar for Dragan.
0
99
Member Avatar for wonderlhily

[CODE][B]action="<?php echo $_SERVER['SCRIPT_NAME'];?>[/B][/CODE] From action is wrong. $_SERVER['SCRIPT_NAME'] returns the current file name with system path, not URL. Should use '$_SERVER['PHP_SELF']' or '$_SERVER['REQUEST_URI']'. And this one should be better for error message. [code=php] if (isset($err) && $err != '') { echo "<strong>Form Error(s)</strong><br/>"; echo "<font color='#cc3300'>". nl2br($err). "</font><br/>"; } ?> …

Member Avatar for ko ko
0
107
Member Avatar for ariffin246

Try this: [code] <? if (isset($_POST['Submit'])){ $fd = fopen ($form_data, "r"); while(!feof($fd)) { $line = fgets($fd); list($data[$counter]->name, $data[$counter]->pass) = explode(',', $line); $counter++; } fclose ($fd); foreach($data as $user) { $sql = "INSERT INTO `table_name` (`field_1`, `field_2`) VALUES('$user->name', '$user->pass')"; mysql_query($sql) or die('Cannot insert the data. Error: ' . mysql_error()); } } …

Member Avatar for ariffin246
0
123
Member Avatar for davy_yg

[code] <?php if($confirmation != '' || $confirmation != null) : ?> <?php echo $confirmation; ?><br/> <?php endif; ?> [/code] You can try like above perhaps.

Member Avatar for cwarn23
0
100
Member Avatar for davy_yg

First of all, put the parameter 'error=1' to line 26 header("Location: http://localhost/php_template2/index.php?error=1"); And, index.php $error = isset($_GET['error']) ? $_GET['error'] : ''; if($error) { echo 'Failed login ! Try again...'; } Put the above code any place you like to display. You can specify the error type with array format. $error_message …

Member Avatar for davy_yg
0
278

The End.