Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
20
Posts with Upvotes
19
Upvoting Members
18
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
6 Commented Posts
1 Endorsement
Ranked #858
Ranked #339
~149.19K People Reached
Favorite Forums
Favorite Tags
Member Avatar for T3STO

You woud access it like any other cookie for the site, using the Request.Cookies collection of the Controller class, `Request.Cookies["cookie"]` returns an object for the cookie named "cookie". Use the ToString() method to retrieve the text value of the cookie. Check out the docs here, https://docs.microsoft.com/en-us/dotnet/api/system.web.httprequest.cookies?view=netframework-4.8 for more details.

Member Avatar for madCoder
0
1K
Member Avatar for sassygray5

On line 79 use $conn->query(...) as you did in your other queries. Use the mysqli object you create at the top of your script.

Member Avatar for sensibledurg
0
26K
Member Avatar for soomro_moon

Yeah, that's the gist of it. [CODE=php] <label for="doctor_id">Select a doctor:</label> <select name="doctor_id"> <?php while($doctor = mysql_fetch_assoc($name)) { printf('<option value="%d">%s, %s</option>', $doctor['id'], $doctor['surname'], $doctor['name']); } ?> </select> [/CODE]

Member Avatar for hardik
-1
3K
Member Avatar for aixlu

Some helpful hints when working with HTML checkboxes and PHP. 1. Name the checkbox entries the same and add brackets to the end of the name. This will result in all the selections being stored into an array when submitted to php. 2. If zero entries are selected, the form …

Member Avatar for Natalia_3
0
3K
Member Avatar for davy_yg

The Mailchimp service (http://mailchimp.com/) is a great option. I manage sending announcements for a client of mine and have used Mailchimp for several years. Mailchimp offers some nice services that would take a lot of effort to replicate yourself: * There are several templates to choose from when creating a …

Member Avatar for madCoder
0
237
Member Avatar for sahilmohile15

$_SESSION is a collection of values stored on the web server per visitor, per browser (ie, tied to the browser by a *cookie* that stores a unique *Session ID*.) Values can be stored in $_SESSION for retrieval on the server in your PHP code in subsequent requests. Your code snippet …

Member Avatar for madCoder
0
291
Member Avatar for sfiso27
Re: Mvc

Same as you would in html: html5: `<button id="foo" disabled>...` xhtml: `<button id="foo" disabled="disabled">...` Submit buttons follow the same pattern: html5: `<input type="submit" id="foo2" value="Submit" disabled />` xhtml: `<input type="submit" id="foo2" value="Submit" disabled="disabled" />` For a more detailed example, answer pritaeas' question. In what language do you want to disable …

Member Avatar for madCoder
0
108
Member Avatar for Drempan

Global.asax is a funny thing and can be problematic because of execution order. It looks like this code is in the `Global.asax` file instead of the `Global.asax.cs` file. Try moving your code customizations to the code-behind file, `global.asax.cs`. If there is a problem with the code there, you'll get a …

Member Avatar for Robert_10
0
722
Member Avatar for Mihailo_1
Member Avatar for batoolhussain

What problem are you having? From what I see of your code sample, the original uploaded image *might* display (though I'm not sure what URL is getting generated.) The changes you make to the `Bitmap` are all happening in *memory*. They are not altering the image **file** on the web …

Member Avatar for madCoder
0
245
Member Avatar for James_43

`index2.html` should be named `index2.php` . The PHP interpreter won't be used (by default, anyway) if the extension is html.

Member Avatar for James_43
0
230
Member Avatar for chineerat

In addition to everything @lps says, can you have sql do some of the work in calculating the results you need? You show `$total` which could likely be calculated from a sql query using aggregate functions like SUM(), etc. MySQL is often much better optimized for generating totals than doing …

Member Avatar for bugz313
0
378
Member Avatar for Violet_82

Line 7 of your code should refer to `expenseID.Text` or `expenseId.SelectedValue` (in the case of a dropdown or radiobutton list.)

Member Avatar for djjeavons
0
3K
Member Avatar for coder91

Initially you can simply use drag and drop to drag content files into your Visual Studio project. This automatically adds the files into your project when you drop the files onto Solution Explorer. As @JorgeM points out, if your colleague is responsible for the upkeep of these files, you'll both …

Member Avatar for coder91
0
180
Member Avatar for SpottyBlue

Many of your radio buttons do not have event handlers. You need an event handler for the "enable" and "disable" behaviors. The "checkchanged" event is fired by the control receiving the new selection (not when losing selection despite the event name implying this.) I have found that the RadioButtonList control …

Member Avatar for madCoder
0
2K
Member Avatar for Sumith Asanka

Without seeing some code behind, it's hard to diagnose but a few things come to mind: 1. Make sure the site is running as an ASP.NET 4.x site (it might be set to run 2.0 or 3.5 for example.) 2. How do you know that the events aren't firing at …

Member Avatar for Santanu Das
0
389
Member Avatar for Blueie

Line 9 in the listing above is likely a syntax error. Simply uncomment the H1 element on line 7 for a title heading. You can't have more than one HEAD element in a document. That HEAD element already exists in the master page. Check your master page to see if …

Member Avatar for Blueie
0
828
Member Avatar for Blueie

The webopt:bundlereference is new in .net 4.5. It is bundling ALL the css in your content folder -- including [Bootstrap](http://getbootstrap.com/)! Basically it concatenates the CSS files, minifies it (removes unneeded whitespace) and sends it all out in one go instead of several seperate files. The blue halo seen around the …

Member Avatar for pritaeas
0
1K
Member Avatar for kaziraja

@kaziraja, you can use the String class' Split method. [C#: String.Split()](http://msdn.microsoft.com/en-us/library/system.string.split%28v=vs.110%29.aspx) table2 = new Table2(); // Assumes a Table2 entity exists. string source="1002008000300-53-9" string[] codeParts = source.split('-'); // Assign split values to your table2 entity table2.column1 = Int32.Parse( codeParts[0]); table2.column2 = Int32.Parse( codeParts[1]); table2.column3 = Int32.Parse( codeParts[2]); // Go persist …

Member Avatar for madCoder
-1
121
Member Avatar for AdriftUniform

You can only display one image using this technique. Put the loop in a calling script. This is done with the image tag: [CODE=php] <?php // ... $query = "SELECT * FROM tbl_images"; $result = mysql_query($query); foreach ($result as $image) { ?> <img src="image.php?id=<? echo $image['id'];?>" /> <? } ?> …

Member Avatar for garyrichard
0
16K
Member Avatar for pebesoft

What's in the 300 fields? Are they repeated sets of data? Surely you don't have a table with 300 columns. If you can post your schema we may be able to help better.

Member Avatar for Byzantine
0
11K
Member Avatar for dinhunzvi

In your loop, test each value against the one that was submitted. If they are a match, mark that option as selected: <option value="<?php echo $row['bankID']; ?>" <?php echo ($row['bankID'] == $_POST['bankID'] ? 'SELECTED="selected"' : '');?> ><?php echo $row['bank']; ?></option> * *The `?` is the ternary operator which works like …

Member Avatar for adam.adamski.96155
0
339
Member Avatar for vizz

Use a session variable to keep track of the last viewed record between sessions. Then use MySQL `LIMIT` clause to set an offset and limit the results to one record. [MySQL Select (limit) reference](https://dev.mysql.com/doc/refman/5.0/en/select.html) When you end up with an empty result set, reset back to record one.

Member Avatar for broj1
0
376
Member Avatar for giovannitao

Have a look at strtotime() http://www.php.net/manual/en/function.strtotime.php The manual says it converts an English date but maybe you can find an Italian localized version.

Member Avatar for pritaeas
0
327
Member Avatar for GlenRogers

In MySQL you can use the LIMIT clause [[Select statement Reference](https://dev.mysql.com/doc/refman/5.0/en/select.html)]. You can use `SELECT COUNT` to determine how many pictures are in the gallery. Decide how many images you want on each page, then divide count into pages. All your links (next, previous, #) will need to pass the …

Member Avatar for GlenRogers
0
167
Member Avatar for Djmann1013

I don't see how the $inactive variable will persist between visits. It is not stored in a session variable and it gets reset to 1 (or 600) immediately when the script begins. Could you provide a spec. that describes exactly how you *intend* this code to work?

Member Avatar for LastMitch
0
387
Member Avatar for Riu 2009

Guessing by your description, what you need is a left join: display all learning materials and their evaluations even when there are no evaluations available. A left join lets you select ALL relevant entries from the first (left) table to a second (right) table even some corresponding entries don't exist …

Member Avatar for Riu 2009
0
267
Member Avatar for DarkMonarch

I have found that MySQL is very effective at doing ORDER BY and the like *IF* proper indexes are set up. Indexing makes a HUGE a difference and is often overlooked. The sql EXPLAIN command is very helpful for evaluating how efficiently a query is being carried out. I admit …

Member Avatar for madCoder
0
151
Member Avatar for cguan_77

One technique is to name form fields in a way that will be translated into an array by PHP. Instead of naming the SELECT element "country1", "country2", etc you can name the fields "country[1]", "country[2]" and so on. When the form gets submitted to PHP, it will automatically convert these …

Member Avatar for cguan_77
0
257
Member Avatar for cssweb

Yes. After a form is submitted and processed, you should issue a redirect to prevent the form from being submitted again unintentionally when a user refreshes their browser (or the browser restores previously open tabs during startup, etc.)

Member Avatar for diafol
0
221