627 Posted Topics

Member Avatar for astroboy44

[QUOTE]when I try to download image ...the file gets corrupted[/QUOTE] Have you tried sending the appropriate MIME type for the file. Assuming you are dealing with a JPEG image, try sending [iCODE]header("Content-type: image/jpeg");[/iCODE] instead of [iCODE]header("Content-type: application/octet-stream");[/iCODE] Also, be sure to add [iCODE]exit();[/iCODE] right before the closing [iCODE]?>[/iCODE]

Member Avatar for astroboy44
0
1K
Member Avatar for TheOmniAdam

in your javascript code, line 66 should be: [iCODE]ajaxRequest.open("[COLOR="Red"]GET[/COLOR]", "dropdownyear.php" + queryString, true);[/iCODE] in dropdownmodel.php, line 12 should be: [iCODE]$opt = "<option [COLOR="Red"]value[/COLOR]='$Mod'>$Mod</option>";[/iCODE]

Member Avatar for hielo
0
178
Member Avatar for matt_platts

You need to enclose the expression in parenthesis for the back reference to work. Since you need to replace based on your php array, you also need to use the 'e' switch at the end of the regex: [CODE] <?php $str="String of text containing item1 and item2"; $x['item1']="Item 1"; $x['item2']="Item …

Member Avatar for matt_platts
0
139
Member Avatar for shailaja mohite

Upload File without COM [url]http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=8525&lngWId=4[/url] Free ASP Upload [url]http://www.freeaspupload.net/[/url] ShadowUploader.asp [url]http://forums.aspfree.com/code-bank-54/pure-asp-upload-script-with-additional-features-94647.html[/url] ("attached" as zip file at bottom of page)

Member Avatar for rakesh4java
0
113
Member Avatar for shinsengumi

[CODE] NOTE: On the steps below ">" mean "click on" ">>" mean "double click on" >Start >Control Panel >>Administrative Tools >>Services >>MySQL Change Startup type to Manual >Apply [/CODE]

Member Avatar for shinsengumi
0
3K
Member Avatar for TheIdiot

whenever you see "Warning: mysql_XXX expects XXX to be resource..." typically it means that whatever query you attempted to execute failed. So replace your line 13 with the following instead to find out what is causing the error: [iCODE]$result = mysql_query($query) or die( mysql_error() );[/iCODE]

Member Avatar for TheIdiot
0
78
Member Avatar for Mars1936

try: [CODE] $i = 0; while($row=mysql_fetch_array($result, MYSQL_NUM)) { echo "$row[0]"; if( !(++$i % 2) ) { echo "<br />"; } } [/CODE]

Member Avatar for Mars1936
0
150
Member Avatar for Moderns

read comments in code below: [CODE=javascript] //queue that keeps track of which requests are currently active var ajaxRequest=[]; //this function is where you would be making your ajax request function requestPage(url) { //now see if url is within ajaxRequest. If so, then just return var tempQ = ',' + ajaxRequest.join(",") …

Member Avatar for Moderns
0
3K
Member Avatar for moonknight33

Change line 14 from this: [iCODE]clickLink.on[COLOR="Red"]C[/COLOR]lick = promptWhatsName[COLOR="Red"]()[/COLOR];[/iCODE] to this: [iCODE]clickLink.onclick = promptWhatsName;[/iCODE]

Member Avatar for hielo
0
194
Member Avatar for professor123

You can use an external/remote SMTP server (Ex: gmail, as suggested above). Go to: [url]http://phpmailer.worxware.com/[/url] and get a copy of the PHPMailer class. Be sure to check: Products -> PHPMailer -> PHPMailer Examples -> Adv. SMTP Examples

Member Avatar for bakir
0
90
Member Avatar for TheWhite

[CODE] var theDiv = document.getElementById("test"); //the div's content alert( theDiv.innerHTML ); /* get the paragraph - NOTE: getElementsByTagName returns an array of references to the elements that match the tag specified. In this case "p". Arrays are zero indexed, so the first P element is at index zero. If you …

Member Avatar for hielo
0
65
Member Avatar for Coder99

It sounds like you have: [CODE] if ($rank < "Boss, Supreme Boss, Kingpin, Don, Godfather"){ echo "You have to be ranked atleast Boss to kill"; } //code that "kills" follows here ... [/CODE] You need to wrap the code that kills in an else clause: [CODE] if ($rank < "Boss, …

Member Avatar for Coder99
0
84
Member Avatar for Infame

Where should be at the end: [CODE] $query = "SELECT COUNT(*) as num FROM $tableName where headm='" . mysql_real_escape_string($_GET['chead']) . "'"; [/CODE]

Member Avatar for harrypinto11
0
77
Member Avatar for UncleJoe

this: [CODE]$(document).ready(function(){ $(".productSelect").click(function() { alert( this.innerHTML ); }); });[/CODE] is equivalent to this: [CODE]$(document).ready(function(){ $(".productSelect").bind('click',function() { alert( this.innerHTML ); }); });[/CODE] but bind will "attach/trigger" that anonymous function upon document.ready [B]ONLY[/B] to [B]already existing[/B] elements with class="productSelect". So, the elements that you are adding via ajax with class="productSelect" do not …

Member Avatar for UncleJoe
0
106
Member Avatar for atticusr5

On line 67, you probably meant to write [iCODE]$var_[COLOR="Red"]U[/COLOR]list = explode("\n",$var_data);[/iCODE]

Member Avatar for atticusr5
0
139
Member Avatar for kkhan00

somewhere in your code you probably have a DB class (ex: [iCODE]$db = new DB(...);/* or something similar */[/iCODE]). Does that class have a method that will let you know if any records were returned? It would help to see the definition of your custom class.

Member Avatar for hielo
0
65
Member Avatar for xuexue

try "APPENDING" the text. If you just swap the lines you have, then you would be overwriting the textarea with the text: [CODE] var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); var cella = row.insertCell(0); cella.style.backgroundColor = "EAEAEA"; var element1 = document.createElement("textarea"); element1.cols = "9"; element1.rows …

Member Avatar for xuexue
0
104
Member Avatar for javanew

If you are viewing the output/result via a browser then try: [CODE]echo "<div style='text-align:center;'>Successfuly sent</div>";[/CODE]

Member Avatar for dietdew12z
0
163
Member Avatar for sahromo

assuming you are using MySQL as your Database, as soon as you execute your INSERT statement, use the mysql_insert_id() function - [url]http://us3.php.net/manual/en/function.mysql-insert-id.php[/url] to retrieve the auto_number.Then use that number to INSERT it into your AF table: [CODE] ... $sql="INSERT INTO `room`(...) VALUES(...)"; $result = mysql_query($sql) or die( mysql_error() ); $Room_No=mysql_insert_id(); …

Member Avatar for hielo
0
87
Member Avatar for imti321

line 27 is missing a semicolon at the end: [iCODE]echo"Page doesnt exist."[COLOR="Red"];[/COLOR][/icODE]

Member Avatar for hielo
0
115
Member Avatar for Nitin Daphale

Try: [CODE] xmlString ="<Chart:Bullet xmlns:Chart='http://yoursite.com' values='100,200' size='100x20' shading='5' ></Chart:Bullet>"; XmlDocument doc = new System.Xml.XmlDocument(); doc.LoadXml(xmlString); //Instantiate an XmlNamespaceManager object. System.Xml.XmlNamespaceManager xmlnsManager = new System.Xml.XmlNamespaceManager(xmldoc.NameTable); //Add the namespaces used in books.xml to the XmlNamespaceManager. xmlnsManager.AddNamespace("Chart", "http://yoursite.com"); [/CODE] Additionally, the following resources may be of interest to you: [url]http://support.microsoft.com/kb/318545[/url] [url]http://stackoverflow.com/questions/331568/how-do-i-add-multiple-namespaces-to-the-root-element-with-xmldocument[/url] [url]http://stackoverflow.com/questions/310669/why-does-c-xmldocument-loadxmlstring-fail-when-an-xml-header-is-included[/url]

Member Avatar for hielo
0
92
Member Avatar for zeeshan_kust

If you have an input element of [iCODE]type="file"[/iCODE] whose [iCODE]name="photo"[/iCODE] then you should be using [iCODE]$_FILES['photo']['name'][/iCODE] since [iCODE]$_FILES['photo'][/iCODE] would actually be an array. [CODE]$TARGET_PATH="pics/"; $TARGET_PATH =$TARGET_PATH . $_FILES['photo']['name'] . '.jpg'; while (file_exists($TARGET_PATH)) { $TARGET_PATH =$TARGET_PATH . $_FILES['photo']['name']. uniqid() . '.jpg'; } [/CODE]

Member Avatar for hielo
0
80
Member Avatar for rolfhorror

Make sure there are no leading nor trailing blank characters. Try: [CODE] $realUser = trim($userPrefs[0]); $realPass = trim($userPrefs[1]); [/CODE]

Member Avatar for rolfhorror
0
132
Member Avatar for rinkarto

try: [CODE]$query="SELECT fieldId FROM table WHERE (fieldName IS NULL) OR (''=trim(fieldName) )"; [/CODE]

Member Avatar for hielo
0
148
Member Avatar for Acute

Ids must be unique, so you will need to change the id of at least one of them or you will likely experience cross-browser incompatibilities. However, it is OK to have multiple elements with the same class name. So, if you change those [iCODE]id='myid'[/iCODE] to [iCODE]class='myid'[/iCODE] then use [ICODE]$('.myid:eq(0)').html()[/iCODE] to …

Member Avatar for Acute
-1
1K
Member Avatar for rsmbd

Try using: [CODE] $result=mysql_query( $sql ) or die( mysql_error() ); [/CODE] Instead so you can determine what is causing the error.

Member Avatar for hielo
0
130
Member Avatar for tcollins412

Try: [code] <?php session_start(); include('dbconnect.php'); $tbl_name="members"; $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'"; $result=mysql_query($sql) or die(mysql_error()); $count=mysql_num_rows($result); if($count==1){ //session_register("myusername"); //session_register("mypassword"); $_SESSION['myusername']=$myusername; header("location:memberpage.php"); exit; } else { echo "Wrong Username or Password"; } ?> [/code]

Member Avatar for hielo
0
103
Member Avatar for tcollins412

assuming the name of your table is Account, try [code] <?php include "connecttodb.php"; $name = mysql_real_escape_string( $_POST['name']); $email = mysql_real_escape_string($_POST['email']); $password = mysql_real_escape_string($_POST['pass']); $query = "INSERT INTO Account( username,password,email) VALUES('$name', '$password', '$email')"; mysql_query($query) or die('There was an error in your registration'); echo'Registration Complete!'; mysql_close(); ?> [/code]

Member Avatar for hielo
0
131
Member Avatar for dtroll69
Member Avatar for Misho

On line 11 you are using CustomerId, but it is NOT initialized yet. You need to initialize it first. Also, try changing line 38 to: [iCODE]fadeimages[counter]=["images/<%=CustomerId & "/" & objItem.Name %>", "", ""][/iCODE]

Member Avatar for hielo
0
83
Member Avatar for leet_uk

Let's say that you are browsing "aboutUs.asp" AND that it contains one of those problematic links. Look at the browser's source code. Does the link in question have [iCODE]href="http://liveserver.com"[/iCODE]?if so, it is not a server configuration problem. Otherwise, also look for [iCODE]<base href="http://liveserver.com">[/iCODE]. if you find it then it is …

Member Avatar for Rosa2303
0
134
Member Avatar for mrlol

[QUOTE] i've detected the problem where my sql statement only call once for each assignments[/QUOTE] You are seeing the correct results. Your query is returning all the relevant rows. The problem is in your DB design. [QUOTE]I hope anyone can help me without changing or upgrading my database.. [/QUOTE] Why …

Member Avatar for hielo
0
138
Member Avatar for rakibtg

[quote]i have found a free php email form[/quote] Where did u find this? I wonder if there's a "manual" for it. Also, can you clarify what you mean by "redirect the title "

Member Avatar for diafol
0
149
Member Avatar for Whilliam

try: [iCODE]onclick="aster( document.getElementById('fn'), document.getElementById('ast1') )"[/iCODE]

Member Avatar for hielo
0
460
Member Avatar for stevenfagan

On those string parameters, include the size of the fields as the fourth parameter. EX: assuming that NameStr is defined (in your DB Table) to be of size 100, try: [iCODE]call sp.addParam("@NameStr", 200, 1, [COLOR="Green"][B]100[/B][/COLOR],"Stuff and Things")[/iCODE]

Member Avatar for hielo
0
292
Member Avatar for ujsiriwardana

[CODE] <?php //your page must start by calling session_start() first: session_start(); //THEN you can begin saving data onto $_SESSION //assuming that in YOUR example, $details is an array - ex: $details=array('firstName'=>'john', 'lastName'=>'doe'); //then you just assign the array to $_SESSION $_SESSION['ecart']=$details; ?> page2.php <?php //If you need to retrieve the …

Member Avatar for eoliva
0
138
Member Avatar for Meriam

[QUOTE]Is it correct?[/QUOTE] No! a.) To delimit the strings you can use either DOUBLE QUOTES (") OR APOSTROPHES('). You are using the backtick(`) which is NOT correct b.) On the document.write() you need to separate different string using a comma(,) NOT a semicolon( ; )

Member Avatar for benqus
0
92
Member Avatar for pgmarco

change your SELECT to: [CODE]<select id="cpule" onchange="updatecost1();"> <option value="Core 2 Duo 2.7">Intel Core 2 Duo 2.7Ghz</option> <option value="Core 2 Qaud 2.6">Intel Core 2 Quad 2.6GHz</option> </select>[/CODE]

Member Avatar for Airshow
0
1K
Member Avatar for sajohnson05

[QUOTE]and also i am trying to read any length of tilde document.[/QUOTE] I don't know what you mean by that but since you are using [iCODE]fgetcsv()[/iCODE] then each line of the file should have columns separated by '~'. If that is the case, try: [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML …

Member Avatar for sajohnson05
0
153
Member Avatar for Dante2

Whenever you see "is not a valid MySQL result resource", that is a clear indication that the query failed. You are probably executing something SIMILAR to: [iCODE]$result=mysql_query($query);[/iCODE] If instead you had suffixed your query with "or die( mysql_error() );": [iCODE]$result=mysql_query($query) or die( "Unable to execute:<br> $query<br>". mysql_error() );[/iCODE] it would …

Member Avatar for Dante2
0
362
Member Avatar for JustmeVSI

create cookie (ex: lastPageLoaded), and whenever you make an ajax request, upon successful retrieval of your content, update the cookie to the url you used last. So, upon page load you just need to see if the cookie exists, If yes, load the page/content from whatever url is in the …

Member Avatar for hielo
0
93
Member Avatar for blt4424

AFTER successful execution of line 11, [iCODE]$sql[/iCODE] contains a resource [B]NOT[/B] a string - so line 28 doesn't make sense. You need to extract the data from the resource ($sql) returned by your query. It is not clear to me which field in [iCODE]$sql[/iCODE] you are interested in , but …

Member Avatar for hielo
0
99
Member Avatar for lili.edryana

On line 34 you are attempting to submit the hidden form, BUT at that point, there is no such form defined/seen by the browser yet because you begin the definition until line 45. What you need to do is call that function AFTER you have closed the hidden form OR …

Member Avatar for lili.edryana
0
2K
Member Avatar for shenbagam

assuming your image table had fields image AND also id: [CODE] <?php $con = mysql_connect("localhost","root","" ); mysql_select_db("test",$con); if( isset($_GET['id']) && is_numeric($_GET['id']) && intval($_GET['id'])>0 ) { $sql="select image FROM image where id=" . intval($_GET['id']) . ' LIMIT 1'; $res=mysql_query($sql) or die(mysql_error()); $row=mysql_fetch_assoc($res); header('Content-Type: image/jpeg'); echo $row['image']; exit; } else { $sql="select …

Member Avatar for hielo
0
114
Member Avatar for vishalkhialani

[CODE] newData="test"; if($('input[name="' + newData + '"]').is(":checked")) { // my other code } [/CODE]

Member Avatar for hielo
0
92
Member Avatar for vishalkhialani
Member Avatar for logicslab
Member Avatar for @developer
0
173
Member Avatar for lit108

On line TEN of your original post you misspelled [iCODE]$image[/iCODE]. You have [iCODE][COLOR="Red"]$iamge[/COLOR] = trim($_POST['image']);[/iCODE]

Member Avatar for cossay
0
183
Member Avatar for stephen_UK

Are you trying to view the images via an HTML page? If yes, do you know what is the SYNTAX for an HTML Image?

Member Avatar for stephen_UK
0
295
Member Avatar for HashimKhan

It is not clear if your end date is October 11 OR 10th of November. At any rate, use CONVERT: [url]http://msdn.microsoft.com/en-us/library/ms187928.aspx[/url] [url]http://stackoverflow.com/questions/10825/howto-compare-a-date-string-to-datetime-in-sql-server[/url]

Member Avatar for hielo
0
31

The End.