627 Posted Topics

Member Avatar for artvor

all you need is: [CODE] var LI = document.getElementById('change'); if( LI ) { //you located an element with id='change' LI.className='someOtherClassNameHere'; } else { //no element contains id="change" } [/CODE]

Member Avatar for Airshow
0
374
Member Avatar for kohar

give them the SAME name ([iCODE]name='date'[/iCODE]), but different values. Then [iCODE]$_GET['date'][/iCODE] will give you the date of the button that was clicked.

Member Avatar for hielo
0
68
Member Avatar for ekSquall

Are ALL of those db fields NUMERIC data types? If you are inserting text, you need apostrophes around the value. If you are inserting a NUMBER then do not put apostrophes around the value - ex: [CODE]INSERT INTO Person(email,age) VALUES('john@company.com',23)[/CODE]

Member Avatar for hielo
0
68
Member Avatar for cicovy

instead of [iCODE]$pct_data = new pie_value(...);[/iCODE] you need [iCODE]$pct_data[B][color=red][][/color][/B] = new pie_value(...);[/iCODE]

Member Avatar for hielo
0
77
Member Avatar for valonesal

[CODE=php] <?php if($logged_in) { echo "Welcome back, $logged_row[username]&nbsp"; ?> <a href="<?= $_SERVER["REQUEST_URI"] . '&amp;action=logout' ?>"><?= $lang['ACC_LOGOUT'] ?></a> <?php } else { print('<a href="http://xxx/login.html">Login</a> / <a href="http://xxx.com/signup.html">Signup</a>'); } ?>[/CODE]

Member Avatar for valonesal
0
103
Member Avatar for nicholaslee21

Currently you have TWO open <form> tags. Get rid of the first one and instead put the [iCODE]<FORM>[/iCODE] around the [iCODE]<table>[/iCODE] and give your form an [iCODE]id="Add_Record"[/iCODE]: [CODE] <html> <head> <!-- <link rel="stylesheet" media="screen" href="DynCalendar/dynCalendar.css" /> <script language="javascript" type="text/javascript" src="DynCalendar/browserSniffer.js"></script> <script language="javascript" type="text/javascript" src="DynCalendar/dynCalendar.js"></script> --> <link rel="stylesheet" media="screen" href="http://www.phpguru.org/css/dynCalendar.css" /> …

Member Avatar for hielo
0
186
Member Avatar for dandixon

Adding a second column is really NOT the ideal approach/solution. What if you add more groups and a person needs to belong to many groups. What you need to do is to add a table to list the groups and another table that holds the membership info: [CODE] Person id …

Member Avatar for dandixon
0
136
Member Avatar for Nathaniel10

I can go to your site now and attempt to request /Nathaniel10.php and you WILL find a reference to it in your log file. However, that does not mean that I "uploaded" said file to your server. It merely indicates that I "tried" to access a file named "Nathaniel10.php" (regardless …

Member Avatar for Nathaniel10
0
120
Member Avatar for Nathaniel10

you cannot use myslq_real_escape_string() UNLESS you are connected to your DB first. Did you? WRONG: [CODE]<?php $username=mysql_real_escape_string($_POST['username']); $password=mysql_real_escape_string($_POST['password']); mysql_connect(...) or die( mysql_error() ); mysql_select_db(...) or die( mysql_error() ); mysql_query("SELECT * FROM Person WHERE username='$username' AND password='$password'" ) or die( mysql_error() ); ?>[/CODE] CORRECT: [CODE]<?php mysql_connect(...) or die( mysql_error() ); mysql_select_db(...) …

Member Avatar for hielo
0
144
Member Avatar for toocoded

[CODE] <input id="txtstext" class="t-box" name="txtstext" type="text" value="<?php echo htmlentities($_GET['var'],ENT_QUOTES); ?>" style="width:100px"> [/CODE]

Member Avatar for hielo
0
115
Member Avatar for dalip_007

try: [CODE] function isAlphabet(elem, helperMsg){ var alphaExp = /[a-z]+/i; var nums=/\d+/; var alnum=/^[a-z\d]+$/i; if(elem.value.match(alnum) && elem.value.match(alphaExp) && elem.value.match(nums) ){ return true; }else{ alert(helperMsg); setTimeout(function(){elem.focus();},20); return false; } } [/CODE]

Member Avatar for dalip_007
0
100
Member Avatar for NBLWebmaster

try: [CODE] <script type="text/javascript"> function goToAnchor() { location.href = <?php echo sprintf('"display_tattoos_2009.php?in=%s#placeholder%s";', $imagenum, $imagenum); ?> } </script> [/CODE]

Member Avatar for hielo
0
162
Member Avatar for tobeye

[CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:/www.w3.org/TR/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" /> <title> Oefeningen 3 week 1</title> </head> <body> <table border="1"> <tr> <th>Fahrenheit</th> <th>Celsius</th> </tr> <?php $Tf = 32 ; $Tc = 0.00; while( $Tc < 100.01) { ?> <tr> <td> <?php echo …

Member Avatar for hielo
0
92
Member Avatar for SSMuller

instead of: [CODE=javascript]var dropInsertBeforeElement = createElement("<div id='drop_insert_before_" + this.id + "' style='height:6px; width:" + totalWidth + "px;'>");[/CODE] try: [CODE=javascript] var dropInsertBeforeElement = document.createElement("div"); dropInsertBeforeElement.id='drop_insert_before_' + this.id; dropInsertBeforeElement.style.height='6px'; dropInsertBeforeElement.style.width= totalWidth + 'px'; [/CODE]

Member Avatar for hielo
0
261
Member Avatar for midjam

[QUOTE]apart from whether the extra is free or not, it just enters 0 into each column.[/QUOTE] which input element determines this? What html markup is your script generating? It would be easier to understand the problem is you post a link to your page.

Member Avatar for midjam
0
203
Member Avatar for danimal132

instead of requesting: [CODE]$url='http://example.com/vast/1/73188';[/CODE] try requesting [CODE]$url='http://example.com/vast/1/73188?cb=' . time();[/CODE]

Member Avatar for hielo
0
284
Member Avatar for ceeandcee

[QUOTE]If there is already Data in the field should I be using UPDATE instead of INSERT?[/QUOTE] UPDATE [QUOTE]How do I specify which record/primary key is to update?[/QUOTE] currently you are generating: [CODE=php] ... echo "<input type='text' size='2' name='PTS1011_wk1'>"; ... echo "<input type='text' size='2' name='GP1011_wk1'>"; ... [/CODE] for each player. I …

Member Avatar for ceeandcee
0
164
Member Avatar for teedoff

[QUOTE]If I were to follow what I think the other forum is suggestion, I would need to put each keyword in a separate table or column? [/QUOTE] A column, NOT a table. And yes, that is exactly what I would do. [CODE][B]Bulb[/B] id ... [B]Category[/B] id name [B] Keyword[/B] id …

Member Avatar for hielo
0
233
Member Avatar for jimdj

It sounds like you are executing: [CODE=php] $res = mysql_query("some query here"); while($row = mysql_fetch_assoc($res) ) { //...code here } [/CODE] what you need to do is add " or die( mysql_error() );" so that you get details about the error. [code=php] $res = mysql_query("some query here") or die( mysql_error() …

Member Avatar for jimdj
0
84
Member Avatar for nyler01

[QUOTE]i've tried using bactick character but it failed.[/QUOTE] Then you either are NOT using MySQL OR you probably used apostrophes instead of backticks. The backtick (`) is the one on the same key as the ~ character.

Member Avatar for nyler01
0
2K
Member Avatar for JayGeePee

I suppose you could simply include a couple of radio buttons: [CODE] <input type="radio" name="member" value="buyer" checked="checked"/>Buyer <input type="radio" name="member" value="seller"/>Seller [/CODE] (OR a select list with the two options).

Member Avatar for P0lT10n
0
150
Member Avatar for arctushar

If the tables already exists, make sure that: -BOTH are using INNODB engine. -In both tables, the fields are of the same type and size ( ex : INT(10)) then try: [CODE=mysql] ALTER TABLE `childTableNameHere` ADD CONSTRAINT `parentTableNameHerechildTableNameHere` FOREIGN KEY (`parentTableNameHere_primaryFieldNameHere` ) REFERENCES `parentTableNameHere`( `primaryFieldNameHere` ) [/CODE]

Member Avatar for hielo
0
90
Member Avatar for ktyler

your problem is because your HTML markup is INVALID. For example, find your first [iCODE]<TR>[/iCODE] element. You have not stated where the [iCODE]<TABLE>[/iCODE] begins! Here's another example. If you were to add [iCODE]<table>[/iCODE] to fix the problem I mentioned above, then you have: [icode]<div><span id='writedist'></span></div>[/icode] as a child of [iCODE]<table>[/iCODE]. …

Member Avatar for hielo
0
68
Member Avatar for andydeans

[quote]i basically have a back end site php/mysql with clients addresses etc, i need to be able to send that data to another site where they have login and passord for and it pre populate the forms in the other site as best as it can.[/quote] but then you said …

Member Avatar for hielo
0
118
Member Avatar for braveheart_sb

Then instead of selecting ALL the records, select only the ones that are null: [CODE]SELECT * FROM `tableName` WHERE `columnName` IS NULL[/CODE]

Member Avatar for hielo
0
128
Member Avatar for danny4444
Member Avatar for spiderguy84

[CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title><font size="+4">~~~FeedTitle~~~</font></title> <meta name="description" content="~~~FeedDescription~~~"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link href="http://www.feedforall.com/rss2html/ffa-29.css" rel='stylesheet' type='text/css'> <style type="text/css"> a { font-size: 30px; } .a font { text-align: center; } body { background: #FFFFFF url(http://www.backgroundlabs.com/backgrounds/358.gif) scroll repeat top left; } </style> </head> <body> …

Member Avatar for Dandello
0
180
Member Avatar for KPheasey

In validateAddUserForm() you are using [iCODE]$error .= ...;[/iCODE] but you have not initialized $error. Initialize it at the very top of your function (before the if clause). If you are still not seeing anything, begin adding [iCODE]echo sprintf('%s(): %s',__FUNCTION__,__LINE__);[/iCODE] statements throughout your function(s) so find out which lines are actually …

Member Avatar for KPheasey
0
288
Member Avatar for lwaterfo

are you being redirected to contractorlogin.php at least? Assuming you are, then in contractorlogin.php you MUST be storing the username in a session. As for the code you posted, you may want to use an EQUAL instead of a LIKE in your query: [CODE] <?php session_start(); if (!isset($_SESSION['memberusername'])){ header("Location: contractorlogin.php"); …

Member Avatar for lwaterfo
0
81
Member Avatar for Clarkeez

Try enclosing the names in apostrophes - [iCODE]'smith, james'; 'beckam, david'[/iCODE]

Member Avatar for hielo
0
131
Member Avatar for Smudly

try: [CODE=php] <?php include_once('inc/functions.php'); // Get the search variable from URL $var = @mysql_safe($_GET['q']) ; $trimmed = trim($var); //trim whitespace from the stored variable // rows to return $limit=10000; // check for an empty string and display a message. if ($trimmed == "") { $error = "<tr><td colspan='2' style='text-align: center; …

Member Avatar for hielo
0
150
Member Avatar for new_techie
Member Avatar for hielo
0
84
Member Avatar for Clarkeez

the easiest approach would be to "instruct" your form to send it directly to google: [CODE] <form method="get" action="http://www.google.co.uk/search"> <input type="hidden" name="btnG" value="Google Search"/> <input type="text" name="q" value=""/> <input type="submit" name="submit" value="Submit"/> </form> [/CODE] and if you want it in a new window: [CODE] <form target="_blank" method="get" action="http://www.google.co.uk/search"> ... </form> …

Member Avatar for hielo
0
117
Member Avatar for andrewliu

[QUOTE]but now when I test my alerts, I get div tag alerts in my SUCCESS alert, and for COMPLETE: success [/QUOTE] OK, but does the SUCCESS alert also have the output of your php search script? try: [CODE] $(document).ready(function(){ $("form.ajax").submit(function(){ var ajax_div = $(this).attr("id")+"_results"; var data = $(this).serialize(); var url …

Member Avatar for andrewliu
0
352
Member Avatar for kadriirdak
Member Avatar for dennishall

I already told you that this: [CODE]list($name, $type, $size, $content) = mysql_fetch_array($result);[/CODE] needs to be using [iCODE]mysql_fetch_assoc()[/iCODE], even if you get a blank screen. The blank screen is due to some other issue. In your case, if you open firefox, go the link you provided, then click on test.php. Press …

Member Avatar for dennishall
0
151
Member Avatar for dennishall

[QUOTE]Is this a mime-type issue in the header section?[/QUOTE] It sure sounds like it. On line 11, try changing: [CODE]mysql_fetch_array($result)[/CODE] to: [CODE]mysql_fetch_assoc($result)[/CODE]

Member Avatar for dennishall
0
351
Member Avatar for MDanz

are you getting any error message reported? Have you verified that the script actually attempts to execute that query? Does the authenticated DB user have permissions to delete records on that db? Does you paragraph have the word 'Example' (uppercase) as opposed to 'example' (all lowercase)?

Member Avatar for AndreRet
0
151
Member Avatar for flamer_x86

what error message did you get? [url]http://us2.php.net/manual/en/function.mssql-get-last-message.php[/url] [CODE] ... mssql_select_db('dbname') or die('MSSQL error: ' . mssql_get_last_message()); [/CODE]

Member Avatar for flamer_x86
0
131
Member Avatar for herghost

using [url]http://www.dustindiaz.com/getelementsbyclass/[/url] try: [CODE] if( !document.getElementsByClassName ) { document.getElementsByClassName=function(searchClass,node,tag) { var classElements = new Array(); if ( node == null ) node = document; if ( tag == null ) tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)"); for (i = 0, …

Member Avatar for hielo
0
185
Member Avatar for Smudly

[CODE] $sql = sprintf("UPDATE sheets SET artist = '%s', title = '%s', active = '%s' WHERE id=%s " ,mysql_real_escape_string($artist) ,mysql_real_escape_string($title) ,mysql_real_escape_string($activestatus) ,mysql_real_escape_string($value) ); $result = mysql_query($sql) or die(mysql_error().'<br>'.$sql); [/CODE]

Member Avatar for Lsmjudoka
0
97
Member Avatar for pallen

[QUOTE]This is what I have in the body of my doc (I didn't include the head because it doesn't seem relevant): [CODE]<body> [COLOR="Red"]<php?[/COLOR] echo "Hello World. You suck!"; ?> </body> [/CODE][/QUOTE] OK, but: a. The name of the file need to end in ".php" b. You MUST use the proper …

Member Avatar for Lsmjudoka
0
231
Member Avatar for nyler01

[QUOTE]give them a result as a link which able to redirect them based on their search[/QUOTE] assuming your search.php page is doing: [CODE=php]$query = "SELECT linkURL, linkText FROM Resources WHERE linkText LIKE '%{$searchTerm}%'"; [/CODE] (where Resources is your table name) and then generating: [CODE] <a href="http://remotesite.com">some text</a> [/CODE] when you …

Member Avatar for nyler01
0
201
Member Avatar for TySkby

the variables declared OUTSIDE the function do NOT exist within the function. So you need to pass all of them (INCLUDING the connection to the db - assuming somewhere you did [iCODE][B]$dbConnection[/B]=mysql_connect(...)[/iCODE]: [CODE] $test = date_sched($month,$date,$num_teachers,$timeslot,$dbConnection); function date_sched($month,$date,$num_teachers,$slot,$dbConnection){ ... } [/CODE] ALTERNATIVELY, you can use the [B]global[/B] keyword to instruct …

Member Avatar for TySkby
0
133
Member Avatar for lse123

I see your method is "doPost()". I don't work with JSP, but IF in fact your server-side script is expecting a POST request, then the ajax you need to set the appropriate headers. So, REPLACE [iCODE] xhrequest.send(null);[/iCODE] with the following: [CODE] xhrequest.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); xhrequest.setRequestHeader('Content-Length',0); xhrequest.send(''); [/CODE]

Member Avatar for hielo
0
205
Member Avatar for 5416339

Refer to: [url]http://www.php.net/manual/en/filter.filters.sanitize.php[/url]

Member Avatar for baltazar
0
153
Member Avatar for yopirates

Before answering your question, make sure you close your <FORM> tags at the end of each tab. Otherwise you will get unexpected behaviour across browsers. As for your problem, the easiest approach to your problem is to bind an onsubmit method to your forms and submit an ajax request. That …

Member Avatar for yopirates
0
1K
Member Avatar for iammirko

the browser submits the [B]NAME[/B] of your input fields, NOT the [B]id[/B]. So you MUST give your fields a [iCODE]name="..."[/iCODE] attribute: [CODE]<input type=text id="usrName" name="usrName" size="20">[/CODE] the same goes for the other fields.

Member Avatar for iammirko
0
448
Member Avatar for raul8

on the non-working code, these: [CODE=php] $renderjcrl = $renderjcrl . '<div id=\"carousel-cars-horiz\">'; $renderjcrl = $renderjcrl . '<ul id=\"carousel-cars\" class=\"jcarousel-skin-tango\">';[/CODE] will end up sending [CODE]id=\"....\"[/CODE] to the browser - meaning, the browser will get the backslash AND the double quotes because (unlike your first code) your overall string is enclosed in …

Member Avatar for hielo
0
51
Member Avatar for jazzash1

are you using the html entity for the pound symbol? &#+163; (remove the + sign. I added it because it was being interpreted as html on this site's editor) [url]http://htmlhelp.com/reference/html40/entities/latin1.html[/url] Also, try adding this to your document's <head>: [CODE]<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />[/CODE]

Member Avatar for jazzash1
0
77

The End.