627 Posted Topics

Member Avatar for ekSquall

You need to close your SELECT. Then to read the selected value upon post: [CODE] if( isset($_POST) && !empty($_POST)) { $userSelected = $_POST['studentrow']; } [/CODE]

Member Avatar for hielo
0
589
Member Avatar for jackparsana

see code below. Notice that there is a leading space: [CODE=html] <input type="text" onchange="this.className+=' YourNewClassNameHere'" value="" /> [/CODE]

Member Avatar for hielo
0
161
Member Avatar for techie929

IF title will always be the first child of catalog, then simply use: [CODE]xmlDoc.documentElement.childNodes[0].firstChild.nodeValue[/CODE] if it is likely to change position, then you will need to "search" for it: [CODE=javascript] var i=-1, limit=xmlDoc.documentElement.childNodes.length; while(++i<limit) { if("title"==xmlDoc.documentElement.childNodes[i].nodeName) { alert(xmlDoc.documentElement.childNodes[i].firstChild.nodeValue) } } [/CODE]

Member Avatar for hielo
0
145
Member Avatar for teedoff

'nickels' is a string, NOT a variable. Your variable is [iCODE]$_POST['nickels'][/iCODE] So do: intval(VARIABLE) * MULTIPLIER: [CODE] <td align="right"><?php echo $totalCents=intval($_POST['pennies']) + (intval($_POST['nickels'])*5) + (intval($_POST['dimes'])*10) + (intval($_POST['quarters'])*25); ?></td> [/CODE]

Member Avatar for teedoff
0
109
Member Avatar for cmccully

instead of: [CODE=php] echo "<input type='radio' id='charID' name='charID' value='" . $row['characteristicID'] . "'/> " . $row['characteristic'] . "<br />" ; [/CODE] try: [CODE=php] echo "<input onclick='window.clickedCharID=this.value' type='radio' id='charID' name='charID' value='" . $row['characteristicID'] . "'/> " . $row['characteristic'] . "<br />" ; [/CODE] then on the function that you need to …

Member Avatar for hielo
0
87
Member Avatar for kapoorvarun23

How To: ======= [url]http://articles.sitepoint.com/article/sql-injection-attacks-safe[/url] [url]http://www.securiteam.com/securityreviews/5DP0N1P76E.html[/url] Prevention ========== Classic ASP: [url]http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=6999&lngWId=4[/url] .NET: [url]http://www.aspnet101.com/2007/03/parameterized-queries-in-asp-net/[/url]

Member Avatar for hielo
0
63
Member Avatar for anandhikrishnan

Based on the fact that you are using [iCODE]document.getElementById("IncludeCharges_no").value[/iCODE], my guess is that you have: [CODE=html] <input type="radio" id="IncludeCharges_no".../> <input type="radio" id="IncludeCharges_yes".../> [/CODE] However, the browser does NOT provide/send the [B]id[/B] to the server. Instead, it uses the [B]name[/B]. So all you need to do is give both buttons the …

Member Avatar for hielo
0
179
Member Avatar for axfv

try adding a "fake" field with a fixed valud for each of the selects and use that as your primary sort field: [CODE=mysql] ( SELECT 1 as `temp`, `name`, `date` FROM `events` WHERE `date` >= curdate() ) UNION ALL ( SELECT 2 as `temp`, `name`, `date` FROM `events` WHERE `date` …

Member Avatar for drjohn
0
172
Member Avatar for aldm

try: [CODE=javascript] $("#ka").change(function(){ var nadkat=$("#ka").val(); $.post("uzmi_podkategorije.php", { nk: nadkat }, function(result){ $("#pka1").show(); var niz=podaci.split("+"); var i=-1,limit=niz.length; while(++i<limit){ $('<option value="'+niz[i]+'">' + niz[i] + '</option>').appendTo('#pka'); } }); }); [/CODE]

Member Avatar for hielo
0
116
Member Avatar for dennishall

What you are actually (incorrectly) doing now is inserting the "BINARY" image content into the div. What you need to do is to insert and <IMG> tag into the div and set the SRC attribute to the path of the image. The browser will take care of the rendering.

Member Avatar for hielo
0
991
Member Avatar for gauri_agr

you need to prefix the double quote with a slash if your echo command uses the double quotes: [CODE=php]echo "Welcome Guest!<br><a href='#' onclick=\"javascript:ajaxpage('login.php', 'ajax');\">"[/CODE] Here's another implementation: [CODE=php]echo 'Welcome Guest!<br><a href="#" onclick="javascript:ajaxpage('login.php', 'ajax');">'[/CODE] and another (look up the sprintf() function on the php.net site if it is not obvious to …

Member Avatar for hielo
0
99
Member Avatar for nikc121

first, start with "blank" html body - just the basic structure with nothing in the body. Then add your table markup with EMPTY cells (<td>) and run it through the validator. If you did anything wrong, it should give you feedback as to what you did wrong. Once you have …

Member Avatar for hielo
0
268
Member Avatar for mayuri_desh

[CODE=php] function toAssoc($arr){ $data=array(); if(is_array($arr)) { for($i=0,$limit=count($arr); $i < $limit; ++$i) { $data[$i]=isset($data[1+$i]) ? $data[1+$i]: ''; ++$i; } } return $data; } [/CODE]

Member Avatar for hielo
0
184
Member Avatar for Borderline

instead of simply executing [iCODE]mysql_query("...");[/iCODE] use [iCODE]mysql_query("...") or die( mysql_error() );[/iCODE]. This way you will get details about the error. As for your ACTUAL problem, I am seeing field named "by", which is a keyword. To avoid this "beginner's mistake" (no offense), ALWAYS enclose the db name, table and field …

Member Avatar for Borderline
0
114
Member Avatar for gauri_agr

On index.php, when you call ajaxpage('page1.php', 'rightcolumn'); then your rightcolumn will have html - the html from page1.php: [CODE] <div id="rightcolumn"> <a href="javascript:ajaxpage('page4.php', 'rightcolumn');">page4</a> </div> [/CODE] When you click on page4, it should load it into the rightdiv of index.php because that link now exists within index.php. On another note, …

Member Avatar for gauri_agr
0
102
Member Avatar for sirin_ibin

instead of [iCODE]CURLOPT_USERAGENT => "spider", // who am i[/iCODE] try proving a value that identifies a popular browser. For example, try this instead: [iCODE]CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9) Gecko/2008052906 Firefox/3.0', // who am i[/iCODE]

Member Avatar for hielo
0
1K
Member Avatar for gauri_agr

line 54 should be [iCODE]id="rightdiv"[/iCODE] NOT [iCODE]class="rightdiv"[/iCODE]. Also, get rid of that "dangling" [iCODE]left;[/iCODE]

Member Avatar for gauri_agr
0
141
Member Avatar for tsp003

it should like in your db field `profileid` you have PHP code instead of just a number. Make sure you have a unique number in it.

Member Avatar for tsp003
0
220
Member Avatar for kracko

all you need to do is use preg_replace() to remove the unwanted set of characters. [CODE] //your initial string $str = 'img*1L%^_ove>ly.jpg'; /* //this removes anything that is NOT //a,b,c,....z //A,B,C,...Z //0,1,2,...9 //In other words, it KEEPS only a-z, A-Z, and 0-9. //If you want other character(s), simply add //it(them) …

Member Avatar for kracko
0
144
Member Avatar for pssubash

When a function executes Synchronously, the following statement is NOT executed until the previous one is done executing - ex: [CODE=javascript] /* here, the statements are executed one after the other. In other words, if the web server is experiencing delays and it takes 5 seconds to respond then you …

Member Avatar for hielo
0
108
Member Avatar for akashnair

[CODE]i have contacted this with my hosting service they said its the problem with php mail () function [/CODE] According to them, what exactly is wrong with it? mail() has no problems sending emails TO external/remote domains. If you are trying to authenticate to a remote server (like gmail) and …

Member Avatar for hielo
0
267
Member Avatar for divyakrishnan

Yes, it is a keyword: [url]http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html[/url] However, if you really want to use that, enclose with backticks: create table emp2 (`Leave` decimal(12,2) default NULL) and when you do any operation on that field (SELECT/UPDATE/INSERT,etc) don't forget to ALSO put the backticks around it as well.

Member Avatar for hielo
0
83
Member Avatar for nedportcj5

[QUOTE]@ip=$server1ip[/QUOTE] ip is a node, NOT an attribute. for testing purposes try: [iCODE]select="document('servers.xml')/servers/ip[@id='172.22.17.80']"[/iCODE]

Member Avatar for hielo
0
186
Member Avatar for techie929

assuming you are making an ajax call, when you send the request, be sure to set the ajax dataType option to "xml". Then use the find() method on the result. This is clearly explained here: [url]http://www.xml.com/pub/a/2007/10/10/jquery-and-xml.html[/url]

Member Avatar for hielo
0
59
Member Avatar for designershiv

[CODE=php]//save everything up to "SCRIPT;" in the variable $js $js<<<SCRIPT <script language="javascript" type="text/javascript"> jQuery(document).ready(function() { $('#countdown_dashboard').countDown({ targetDate: { 'day': 17, 'month': 9, 'year': 2010, 'hour': 1, 'min': 0, 'sec': 0 } }); }); </script> SCRIPT; /*note the line where you see "SCRIPT;" MUST end with a semicolon IMMEDIATELY followed by …

Member Avatar for hielo
0
147
Member Avatar for dschuett

change: [iCODE]<input type="submit" name="submit" id="submit" value="Submit">[/iCODE] to: [iCODE]<input type="submit" name="Submit" id="Submit" value="Submit">[/iCODE] uppercase "S" for the name and id. Do not use lower case since it is reserved for javascript. As for your problem (with the current submit button), it is on line 138. Change the input field as suggested …

Member Avatar for dschuett
0
295
Member Avatar for Viruthagiri

[QUOTE]Can i change this url to alertpay payment gateway url? If i change this url will it working?[/QUOTE] Not likely. If you changed the URL to point to MY site, then on my site there would need to be a script in place that "receives/processes" the information sent to my …

Member Avatar for hielo
0
94
Member Avatar for heshanm

In javascript you cannot customize the buttons. alert() displays: OK confirm() and prompt() displays: OK , Cancel Your option would be to use a javascript plugin: [url]http://trentrichardson.com/Impromptu/index.php[/url]

Member Avatar for heshanm
0
262
Member Avatar for tngadgetlady

That typically happens when you have the WRONG path to the image and/or you have misspelled the image name. Also, be aware that some webservers are case-sensitive. So if your image name is "logo.gif", then if you code "logo.GIF", it will not work. So, your first task is to figure …

Member Avatar for churva_churva
0
103
Member Avatar for heshanm

Save this as hielo.php and try it: [CODE=php] <?php if( isset($_POST['nic']) && !empty($_POST['nic']) ) { mysql_connect("localhost","username","password") or die( mysql_error() ); mysql_select_db("dbName") or die( mysql_error() ); $sql = sprintf("SELECT `customer_id`, `nic`, `full_name`, `name_with_initials`, `address`, `contact_number`, `gender` FROM `customer` WHERE `nic`='%s'", mysql_real_escape_string($_POST['nic']) ); $result=mysql_query($sql) or die( mysql_error() ); if( 0==mysql_num_rows($result) ) { …

Member Avatar for heshanm
0
95
Member Avatar for heshanm

save this as hielo.php and try it: [CODE=php] <?php define('TABLE_NAME','accounts'); $dbConnection= mysql_connect("localhost","username","password") or die( mysql_error() ); $fields=array( 'tran_ID'=>array('label'=>'Transction ID','format'=>"%d") ,'account_type'=>array('label'=>'Account Type','format'=>"'%s'") ,'account_number'=>array('label'=>'Account Number','format'=>"'%s'") ,'transaction_type'=>array('label'=>'Transaction Type','format'=>"'%s'") ,'amount'=>array('label'=>'Amount','format'=>"'%s'") ,'Date'=>array('label'=>'Date','format'=>"'%s'") ); mysql_select_db("dbName") or die( mysql_error() ); if( isset($_POST['update']) && !empty($_POST['update']) ) { updateRecord($_POST['tran_ID'], $dbConnection); } elseif( isset($_POST['edit']) && !empty($_POST['edit']) ) { showSelectedRecord($_POST['tran_ID'], $dbConnection); …

Member Avatar for heshanm
0
129
Member Avatar for ﻼim

to reload the whole page: [CODE=html] <a href="#" onclick="top.location.reload(true)">Reload Page</a> [/CODE]

Member Avatar for ﻼim
0
93
Member Avatar for 0xCMD

Make sure your tables are using InnoDB Storage engine and then try: [CODE=sql]ALTER TABLE `ORDERS` ADD FOREIGN KEY(`CUSTOMER_NUM`) REFERENCES `CUSTOMER`(`CUSTOMER_NUM`);[/CODE]

Member Avatar for 0xCMD
0
250
Member Avatar for samsons17

instead of [CODE]SELECT * ...[/CODE] use: [CODE]SELECT blogpost, DATE_FORMAT(dateandtime,'%M %e %Y at %h:%i%p') as dateandtime ...[/CODE]

Member Avatar for samsons17
0
104
Member Avatar for sjeggels

[iCODE] ... where id = '$_SESSION[user_id]'")[/iCODE] are you updating $_SESSION[user_id] to that of the one you selected/click on in profile.php?

Member Avatar for hielo
0
264
Member Avatar for emigrant_tech

When using ajax, from your local machine, you need a local web server installed. You cannot open your test file via "file://...". You must open your file using "http://..." since ajax makes http requests. If you are using the "file" protocol instead of the "http" protocol, it will not work. …

Member Avatar for emigrant_tech
0
1K
Member Avatar for hellomadhur

a. Post the code you have thus far (the file doing the "importing") b.specify how you are accessing/loading your test page from the browser (ex: using [url]http://localhost[/url], file:///path/to/file, [url]http://yoursite.com[/url]) c. post a sample of the xml file you are trying to load.

Member Avatar for hielo
0
3K
Member Avatar for hellomadhur

I tried exactly what you posted and it works fine for me. Here is something else I tried: [url]http://articles.sitepoint.com/article/xml-data-source-object/[/url] (specifically refer to page 2) and it also works for me. I suspect your problems are all tied to security permissions. If that is the case, I suspect that even that …

Member Avatar for hielo
0
106
Member Avatar for khaleel_rashid

try: [CODE=javascript] function calc(){ room_charges = isNaN(parseInt(document.ipd_bill.room_charges.value)) ? 0 : parseInt(document.ipd_bill.room_charges.value); lab_charges = isNaN(parseInt(document.ipd_bill.lab_charges.value)) ? 0 : parseInt(document.ipd_bill.lab_charges.value); consultancy_fees = isNaN(parseInt(document.ipd_bill.consultancy_fees.value)) ? 0 : parseInt(document.ipd_bill.consultancy_fees.value); blood_charges = isNaN(parseInt(document.ipd_bill.blood_charges.value)) ? 0 : parseInt(document.ipd_bill.blood_charges.value); organ_charges = isNaN(parseInt(document.ipd_bill.organ_charges.value)) ? 0 : parseInt(document.ipd_bill.organ_charges.value); discount = isNaN(parseInt(document.ipd_bill.discount.value)) ? 0 : parseInt(document.ipd_bill.discount.value); document.ipd_bill.total_payment.value = eval(room_charges) + …

Member Avatar for hielo
0
100
Member Avatar for sourceskill

try: [CODE=asp] <% 'Note: No Trim() nor UCase() after the "to" for i=1 to Request.QueryString("print").Count 'NOTE: the (i) is adjacent to querystring If Trim(UCase( Request.QueryString("print")(i) )) = Trim(UCase(rsAuto.Fields.Item("vin").Value)) Then %> <tr> <td width="10%" height="45" align="center" valign="middle"><%=(rsAuto.Fields.Item("year").Value)%></td> <td width="15%" align="center" valign="middle"><%=(rsAuto.Fields.Item("make").Value)%></td> <td width="30%" align="center" valign="middle"><%=(rsAuto.Fields.Item("vin").Value)%></td> <td width="15%" align="center" valign="middle"><%=(rsAuto.Fields.Item("title").Value)%></td> <td width="25%" …

Member Avatar for sourceskill
0
104
Member Avatar for ruwanaru

Are you always getting "ERROR" when you submit the form? If yes, then try changing [iCODE]$header="from: $name <$mail_from>";[/iCODE] to: [CODE=php] $header="From: " . $mail_from . PHP_EOL; $header="To: " . $to.PHP_EOL; [/CODE] If you are NOT seeing "ERROR", then check your spam folder.

Member Avatar for hielo
0
139
Member Avatar for finnj6
Member Avatar for hielo
0
147
Member Avatar for Siberian

you have to use the getElementById() AFTER the page has finished loading. Try: [CODE=javascript] function car(seats,engine,theradio) { this.seats=seats; this.engine=engine; this.theradio=theradio; } var work_car=new car ("cloth","V8","Tape Deck"); var b1=null; window.onload=function(){ b1 = document.getElementById("work_car"); b1.onclick=function(){ alert("I want a car with " + work_car.seats + " yeah"); //if you put <div id="message"></div> in …

Member Avatar for Airshow
0
228
Member Avatar for micahgeorge

assuming you had: [CODE=html] <input type="text" name="person" value="John"/> <input name="sport[]" type="checkbox" value="baseball"> <input name="sport[]" type="checkbox" value="basquetball"> <input name="sport[]" type="checkbox" value="football"> <input name="sport[]" type="checkbox" value="hocket"> [/CODE] then: [CODE=php] foreach($_POST['sport'] as $value) { $sql = sprintf("INSERT INTO `Atletes`(`personId`,`sportName`) VALUES('%s','%s')" ,mysql_real_escape_string($_POST['person']) ,mysql_real_escape_string($value) ); } [/CODE]

Member Avatar for hielo
0
243
Member Avatar for Smudly

It sounds like you are INITIALLY arriving at the page via [iCODE]editsites.php?siteid=95[/iCODE], in which case line 11 works as expected. BUT your FORM does not "save" that siteid, so when you submit/POST the form, it is going to editsites.php, NOT to editsites.php?siteid=95. So add the site id to your FORM's …

Member Avatar for hielo
0
163
Member Avatar for arctushar

CREATE TABLE student( name CHAR(100), father CHAR(100), mother CHAR(100), address VARCHAR(255), PRIMARY KEY (name,father,mother) )

Member Avatar for hielo
0
149
Member Avatar for rickkyric
Member Avatar for hielo
0
45
Member Avatar for PHP_develop

Fix line 5. The name of your select is "additions" NOT "extrastuff". Also, on line 14, the third parameter to mysql_connect() should be $pass. Lastly, the syntax for INSERT is: [code=sql]INSERT INTO TableName(FieldName1, FieldName2) VALUES('valueForField1','valueForField2')[/code]

Member Avatar for hielo
0
113
Member Avatar for dev.vini

First make a DELETE query. It it succeeds, then make an UPDATE query - ex: [CODE] $id=3; mysql_connect("localhost","username","password") or die(mysql_error()); mysql_select_db("dbname") or die(mysql_error()); mysql_query("DELETE FROM tableName WHERE `id`=$id") or die(mysql_error()); mysql_query("UPDATE tableName SET `userno`=`userno`-1 WHERE `id` > $id") or die(mysql_error()); [/CODE]

Member Avatar for peter_budo
0
128
Member Avatar for arctushar

name them with "array notation" syntax: [CODE=html] <input name="name[1]" /> <input name="father[1]" /> <input name="name[2]" /> <input name="father[2]" /> <input name="name[50]" /> <input name="father[50]" /> [/CODE] Then, when you post the data, that index will be used to find the related records: [CODE=php] <?php //on every iteration, $numKey will vary …

Member Avatar for arctushar
0
86

The End.