- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 9
- Posts with Upvotes
- 9
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
50 Posted Topics
| |
Re: The command "cmd2" has the property Connection that has not been initialized. To fix this, you will need to set the Connection property of "cmd2" to the variable "con" ie. Add the following code immediately after you declare "cmd2" [icode]cmd2.Connection = con[/icode] You need to understand that there are 2 … | |
Re: My suggestion will be as follows: 1. HTML then CSS - this way you get to learn how HTML can change the appearance of a webpage, before using the better option CSS to do so. 2. Javascript, XML then AJAX - this way you understand the syntax and semantics of … | |
Re: Try putting a PHP link in the href that sends the request to a PHP file that will process the request and sends back the .RAR file. eg. `<a href="download.php?id=546" title="Download Memory Game">Download</a>` Then inside download.php you put code that sends back the .RAR file by specifying the appropriate headers. … | |
Re: I believe this is what you're trying to achieve. [code] <div style="float:right; position:relative; width:250px; height:250px; background-color:#BBB;"> <div style="position:absolute; top:10; left:10; width:100px; height:100px; background-color:#333;"></div> <div style="position:absolute; top:10; right:10; width:100px; height:100px; background-color:#555;"></div> <div style="position:absolute; bottom:10; left:10; width:100px; height:100px; background-color:#777;"></div> <div style="position:absolute; bottom:10; right:10; width:100px; height:100px; background-color:#999;"></div> </div> [/code] | |
Re: I think the problem might be the frameset itself. It's src attribute is always set to "http://stmatthias.dnsalias.com" which retrieves the homepage. Regardless of whichever link you click, when the page loads it will come to the frameset part and retrieve the page pointed to by the src attribute. So, i … | |
Re: How exactly do you want to use the value from selectbox "mymenu" in selectbox "uid". It seems you pretty much have the idea, except in your getChapterID() you should be retrieving the value of "selectmenu" rather than of "this.options" ![]() | |
Re: You can create a parent div that contains 2 child divs. The first child div should be floated left, whilst the other floated right. But, you will have to do some fiddling with CSS to make the children divs remain in the parent. | |
Hi All I am looking for a new language to learn and add to my language set that already contains PHP & C# in much depth. Ruby is one language i was thinking of learning. Can you guys please give me practical uses and/or applications that use/may use Ruby. I … | |
Re: you will need to loops, one loop maintaining track of the rows, and the other maintaining track of the columns. e.g. [code] <?php $count = 0; for($i=0; $i<3; $i++){ //num of rows for($j=0; $j<5; $j++) //num of cols echo "Number ".++$count." "; echo "<br>"; } ?> [/code] | |
Re: Ctaylo, passing your array the way you have done will only send a string value in a $_GET variable called id, accessible as $_GET['id']. The solution to your problem will be for each of your checkboxes have their name attribute set to "graph[]", and their respective value attribute set, to … | |
Re: I'd say go for open source (PHP/MySQL or Postgres) - free everything. - Cheaper on your bandwidth when you download the software, compared to say >200Mb for SQL Express, .NET ..., Service Packs etcs - I have forgotten other reasons | |
Re: If you check line 21 of the code you pasted above, there is a call to the function random_str(). Where did you define this function ? By defining, it means where is the implementation of the function ? eg [code]function random_str($iLength) { // code for generating a string containing $iLength … | |
Re: Usually what i do is, when i upload a photo i store the filename (eg picture.jpg), and some other details about the picture in a table (eg tblPictures). In this table i also have an extra column "order_id", which i use for sorting the images in the table. So, assuming … | |
Re: I have once done something similar for a website i have worked on. It was for the CMS section. What I wanted to achieve was: Edit a web page's details and save the details directly to an HTML file. The logic was simple, after clicking the save button on the … | |
Re: Well, i have solved such a problem differently before. [U]Method 1[/U] - add 2 extra columns to your database table: month and year (but keep the 'dates' field) - each time your save a News article in the table, also extract the month and year from the date, and save … | |
Re: That's a simple one. Just add the clause " AS questioncount " immediately after the COUNT keyword. ie. [icode]SELECT COUNT($questionName) AS questioncount FROM interview_answers ...[/icode] Then in line 9 use the code: [icode] echo $totalresponses = $row['questioncount'];[/icode] | |
Re: orcaraheel, What do you really mean by just sending the title "update problem" and some code? Is it a question, a statement or fact ? Do you need help ?!?!? Plus if you are to paste/type your code, always include it within [code][/code] tags ! | |
Re: $sSQL = "select * from tblExams"; $rResult = mysql_query($sSQL); $aExams = array(); while($aExams[] = mysql_fetch_assoc($rResult)){} //accessing your array items (table rows) foreach($aExams as $iIndex => $aExam) { echo $aExam['exam_name']." ".$aExam['exam_date']."<br/>"; } | |
Re: Assuming you are retrieving your countries from a mysql table. Then your code should be something like the one below. ie. Loop for all the countries and check if the posted country value matches the one in the current loop. If so, display it as selected. [code] $postedCountry = isset($_REQUEST['country_id']) … | |
Re: I think what you are supposed to do is as follows: - When you save your array in the session, you need to uniquely identify each array you store in the session ie Instead of this code you use [code] $_SESSION["varukorg"][] = array( "artikel" => $_SESSION['art'], "produkt" => $_SESSION['product'], "antal" … | |
Re: Hi Nsam, I think that you are expecting different results for the input you put in the hyperlink. Check this part: [icode]echo "<td><a href='docassign.php?cow={$getcowid}&cit={$row['city']}'>".$row['city']."</td>";[/icode] You're clearly setting the get variable 'cow' to [icode]$getcowid[/icode], but the value in [icode]$getcowid[/icode] is actually [icode]$_GET['mid'][/icode], instead of the one you want [icode]$_GET['cow'][/icode]. Therefore, i'd … | |
Re: Check this out on PHP site: [url]http://www.php.net/manual/en/function.imap-open.php[/url] | |
Hi All, Can anyone please help me. I am trying to connect to a Pervasive SQL v9 database using a PHP script. I have been trying for hours to make a connection but all my browsers keep loading with no response from the server. The PHP code is as follows: … | |
Re: First things first, you need to write simple algorithms/procedures for your desired tasks. From what i see the simple steps would be something like. 1. click add takes you to page for adding data 2. click update modifies your data 3. click delete will take you to page for deletion … | |
Re: well, if the problem is on line 48, the most sinister actors would be the 2 arguments '$dir1' AND '$dir/thumbs/$photo1' - try outputting these strings before you call the function, and see what they contain. e.g. [icode]echo "++$dir1++$dir/thumbs/$photo1++";[/icode] | |
Re: Hi jbob, i didn't thoroughly analyze your code, but did a quick run through it, and i found 2 errors to start of with. - line 83, the value being echoed into the hidden control's value attribute, has an extra $ sign. I don't think you need the $ sign. … | |
Re: Well, i dont know how helpful this is, but once my applxn could not use the gd functions too, though the library was installed, so i read some article that told me i had to uncomment the line that included the gd library in the php.ini file. So, after uncommenting … | |
Re: Here's the idea, though i have not tested the code, the logic is correct. [code] <?php $sql = "SELECT * FROM options LIMIT 65"; $rs = mysql_query($sql); echo "<form name='frmChk' action='mypage.php' method='post'>"; while($row = mysql_fetch_assoc($rs)){ $label = $row['option_name']; echo "<input type='checkbox' name='chks[]'> $label <br>"; } echo "<input type='submit' value='Validate & … | |
Re: Hi there, Here's the modified version of Dasatti's printContents: [code] <?php $dir = "poems/"; printContents($dir); if(isset($_REQUEST['f'])){ $fh = fopen($_REQUEST['f'],"r"); $theData = fread($fh,filesize($_REQUEST['f'])); fclose($fh); echo "<pre>$theData</pre>"; } function printContents($dir) { $mydir = opendir($dir); while(false !== ($file = readdir($mydir))) { if($file != "." && $file != "..") { if(is_dir($dir.$file)) { printContents($dir.$file) ; … | |
Re: To optimise your code for readablity, and avoiding boredom of scrolling down - like i experienced. Replace your js functions such as [CODE] function HighLightTR39(el, rowName){ if (document.myform.s39.checked == true) { el.bgColor=bgcolorSelected; } else { el.bgColor=bgcolorNotSelected; } } [/CODE] using one function similar to the one below which passes the … | |
Re: Try the code below. You will have to decide what you will do with the js multi dimensional array in the javascript code where there is alert('...'). [CODE] <?php //create your multi lists here $list1 = array("php", "asp.net", "javascript"); $list2 = array("excellent", "good", "brilliant++"); $list3 = array("that", "was", "easy !"); … | |
Re: Well, we can't solve what we can't see. Give us the logic of the code or rather the code itself then we might determine whether we can/not solve it :) | |
Re: Usually all output disappears from your browser if you have an error in your code, and error_reporting is set to E_ALL & E_NOTICE in your php.ini file. In this case, i think your error, is that you are using trying to access array items using associative indices, when your array … | |
Re: Show us the code, show us the code. Where's the code, give us that yum yummy code !! ![]() | |
Re: Well for your database you can create a table called tblRooms, which contains the following fields: - room_id (primary key) - room_name (varchar) - room_features (string/text ?!?) - is_booked (boolean) - date_booked (date) - duration_booked (integer => num of days) Now to check if the room is available between certain … | |
Re: Well, for starting you did not provide the file containing the form, so i am going to have to assume line 88 contains the values from the checked checkboxes: [icode]$nletter=empty($_REQUEST['news']) ? array() : (array) $_REQUEST['news'];[/icode] what you need to do next is create a string from this array($nletter), then append … | |
Re: I am not quite sure which value it is you want to get, but i will assume it is the filename. In that case, i would have done this: [code] <a href="#" target="_blank" onClick="window.location='target.php?file=<?php echo $rows['file_name']?>'">View</a>[/code] In this case, target.php is the file that is to process your value(filename). Hope … | |
Re: The simplest solution would to do a google search for "submitting forms in ASP.NET" | |
Re: Well, i think i can visualize the logic of waht you want - though don't know why you would want to do that ! I would use 2 events: - first in the onchange event of the textbox i would set a certain module level boolean variable to true (eg … | |
Re: dont you think that the error could be in the include file itself ? Well, judging from the numbering, line 26 would be in the include file itself ?!? I think it's worth a check ! | |
Re: Well, you can try this: [code] int findSum (vector < int > v){ int sum = 0; if(v.size() <= 0) return 0; else{ position = v.size() - 1; sum += v.at(position); v.remove(position); //need to have this function/similar in the vctr return findSum(v); } } [/code] | |
Re: Since the compiler runs in a top-down fashion, the last code executed on page load, is the setting of focus on textbox2. Which means textbox1 will not get focus unless you shift tab to it. I think what you should do is just put the separate code fragments you want … | |
Re: Here's a sample for a single checkbox, you can do the rest: [code] <form method="POST" action="http://*********.php"> <span class="label">Header</span> <input type="checkbox" name="header" value="1"> <input type="submit" name="submit"> </form> <?php if(isset($_POST['submit'])){ $header = (isset($_POST['header'])) ? $_POST['header'] : "0" ; $insert = "INSERT INTO layout (header) VALUES ('$header')"; mysql_query($insert); } ?> [/code] What you … | |
Re: [code]AND Ships.Dest_State IN ('LA') ORDER BY 'PU_Date ASC'[/code] In this last line, you have i think mistakenly put the keyword ASC as part of the column name. Try removing the ASC from the quotes ! | |
Re: put total += length, total += length/3.208, total += ((length / 12) * 3.2808); in their respective places. Note D += A is shorthand for D = D + A Dont forget to terminate the statements. | |
Re: hello, i have a mysql database which i use a php script to search and display results with fields make, model, price, year and would like to add extra functionality with presumably javascript to add a drop down form field as when a particular make is selected from the list … | |
Re: [ICODE] background: url(structure_folder/i_background.png) no-repeat; background-size: 100%; [/ICODE] - usually, i put the image path in quotes. Have you tried that yet ? I would try: [ICODE] background-image: url("structure_folder/i_background.png"); background-repeat: no-repeat; background-size: 100%; [/ICODE] | |
Re: [QUOTE=br1dil;773961]Hello everyone, At first, I would like to wish an happy new year for everyone. Now, my problem! I'm starting a new web app (which is the first one I will completely write) and after modeling the database, I encoutered a problem for adding datas in my category's table: [code]-- … | |
Re: What i would first attempt to do is to check whether the field 'file' has anything after being posted, if it is set to something (hopefully a filename) then we can proceed to call the other image processing stuff. Otherwise we omit the image processing code. i.e. [code=php]//put the isset(...) … |
The End.