mmcdonald 28 Posting Pro

Okay chap, I'm sorry I couldn't help at all - good luck!

mmcdonald 28 Posting Pro

So you do, it was me that didn't, sorry!! :D Still reading but what you have looks fine. Have you tried using the style editor in your browser, unchecking certain styles applied on the form, fields and appended icons? I'm struggling simply because everything looks fine with the mark-up above.

mmcdonald 28 Posting Pro

Sorry for the lack of clarity.

Change this:

<div class="input-group-addon">@</div>

to this:

<span class="input-group-addon">@</span>

I'm wondering if it's a style on the division tag that's causing the issue.

mmcdonald 28 Posting Pro

Oooooo funky - can you change the tag from a div to a span please? And in the good spirit of not stealing content on the web, I'm currently reading through this: https://github.com/plataformatec/simple_form/wiki/How-to-use-Bootstrap-3-input-group-in-Simple-Form and this http://www.tutorialspoint.com/bootstrap/bootstrap_input_groups.htm

Take a look. I'll post back if I spot something important!

mmcdonald 28 Posting Pro

The example uses a horizontal form, but that's not what I want. The first column are personal details, the second company details. They can't flow like the example.

<form>
<div class="row">

    <div class="col-lg-6">
        <div class="form-group">
             <div class="input-group">
                    <span class="input-group-addon">@</span>
                    <input runat="server" class="form-control" ... />
              </div>
              <div class="input-group">
                    <span class="input-group-addon">@</span>
                    <input runat="server" class="form-control" ... />
              </div>
              <!-- more personal fields... -->
         </div>
    </div>

    <div class="col-lg-6">
        <div class="form-group">
             <div class="input-group">
                    <span class="input-group-addon">@</span>
                    <input runat="server" class="form-control" ... />
              </div>
              <div class="input-group">
                    <span class="input-group-addon">@</span>
                    <input runat="server" class="form-control" ... />
              </div>
              <!-- more company fields... -->
         </div>
    </div>

</div>
</form>

I've litterally slapped that together on the DW editor so excuse any blatent mistakes, I'm currently stuck on a corporate citrix farm :P I believe the layout above would do the trick? Can you get it displayed and show me a picture to help visualise? Sorry if I'm actually making this experience more painful haha :D

Michael

mmcdonald 28 Posting Pro

A fluid container with two columns is the way I would proceed.

If you want to play around with BS3 forms before you begin check these out:

A form builder:
http://bootsnipp.com/forms?version=3

Some useful example code (All credit to 'pppeater'):
http://www.bootply.com/pppeater/jrNvaahcOh

Write some code and then post it here and we can all take a look and shuffle bits around :)

Regards,
Michael

mmcdonald 28 Posting Pro

Change this:

echo 'There are . $result . 'members';}

to this:

echo 'There are '.$result.' members.';}

Check out this PHP doc on string operators: http://www.php.net/manual/en/language.operators.string.php, specifically concatenation.

If that's not the issue you could change your select statement and try something like this:

<?php

$result = mysql_query("SELECT COUNT(*) as count FROM registration") or DIE(mysql_error());

if($result['count'] > 0){
    echo 'There are . $result . 'members';
}else{
    echo 'There are no registered members yet!';
}

?>

(Note: untested, probably won't work as-is!)

If that doesn't work let me know and I'll have another look through.

Michael

mmcdonald 28 Posting Pro

The only way to get an answer for this question is to do some tests for yourself, or perhao an automated tester to colelct a few thousand results. In each test record exactly how much bandwidth is used, then multiple that by expected traffic and voila.

FYI this is a breach of the forum rules:

I posted this message under both Web Development (Web Design, HTML, and CSS) and under (JAVASCRIPT, DHTML, and AJAX) as I was not sure where to post it.

mmcdonald 28 Posting Pro

Just tested and that works, even back in the year 1066 :)

mmcdonald 28 Posting Pro

Then your code should work entirely with the datetime class as this isn't limited on date: http://php.net/manual/en/class.datetime.php (I believe you already were, apologies for overlooking the obvious mate!)

$date = new DateTime('1920-01-01');
$date->modify('+18 years');
echo $date->format('Y-m-d');

//Outputs: 1938-01-01

I believe that will do the job? (Untested!)

mmcdonald 28 Posting Pro

Has the service stopped running?

On Windows:
Start Menu > Run > Type: 'services.msc' > Hit enter > Find 'mysql' > Right Click > Click 'Start' if not already running.

mmcdonald 28 Posting Pro
mmcdonald 28 Posting Pro

I wish I had haha I usually do tbh...

Nope, only thing recovered was the title :3

mmcdonald 28 Posting Pro

I spent 20 minutes building a really large yet nice question, hit submit and BOOM. Could have cried :'( I had indented the code perfectly too haha This was about 2 hours ago GMT.

heyho, just another day in the office! Everything seems to be responding well now though.

mmcdonald 28 Posting Pro

As the other two said... don't do it, not when there are really cheap packages out there (and some free ones!). If you do this a lot and know a lot of people in a similar situation perhaps you can split the hosting host and setup come security. You should of course only do this if the other people you're sharing with are family or best friends. Even then it's VERY risky and just not ideal.

I have an old PC setup on my second line that has 1GB RAM and an 80GB HDD - it's got Ubuntu 10.04 installed (Well.. the complete LAMP stack), and I use it for when any friends, clients or family want to test/review an unfinished project. It also acts as a lovely server for all of my families photos and such :3 It's always nice to login and find that your mum has uploaded baby photos for the whole clan to see -.- using a laptop/desktop to host something isn't difficult, not at all, securing it without knowledge and keeping it up 24/7 is of course another kettle of fish.

mmcdonald 28 Posting Pro

I agree with perlexed, it looks as though you're asking for a game_id when... well when you already have one?

SELECT `game_id` FROM `games` WHERE `game_id`=

I personally would use the SQL like function, because if the users search term doesn't match your predefined name EXACTLY, you'll get no results.

The MySQL LIKE operator will return results with a similar value to the submitted search term.

mmcdonald 28 Posting Pro

AK777, if you have your answer please don't forget to mark the topic as solved :)

mmcdonald 28 Posting Pro

Wrong category and no explanation..?

mmcdonald 28 Posting Pro

Create another file called 'populate.php' or something similar, in this file you're going to write standard PHP that includes a DB connection, the collection of data, based on the users input, and then the population of fields.

This in your original file (where the dropdown and the table exists) add something like: <div id="populatedTable"></div>.

What you then want to do is call in the populate.php script using AJAX, but with a variable URL containing the value of RMA; something like this:

<div id="populatedTable"></div>

<script type="text/javascript">
    // reloads populated table every 10 seconds

    var auto_refresh = setInterval(
        function (){
            $('#populatedTable').load('populate.php?rma=<?php echo $rma; ?>');
        }, 10000
    );
</script>

Then in populate.php you need to use $_GET['rma'] and construct your MySQL query based on that value.

Instead of the 10 second refresh timer you can choose to make it refresh once after the users imput is detected from the dropdown using JQuery.

To be honest, you're bascially asking someone to teach you AJAX, and we can't do that, it's simply too much. Teach yourself JQuery and AJAX from YouTube or another tutorial and then come back when you need some help with your new code, only then will our help be genuinely beneficial to you.

Michael

mmcdonald 28 Posting Pro

You can use HTML2Canvas to grab a screenshot of a remote URL and save the captured image locally, their libraries are dead easy to use/understand too, in fact, in 4-6 lines of code you could collect, name and store a screenshot of a URL.

If you want users to see 'live' updates you could have a cronjob constantly running with a loop, constantly getting new screenshots every cycle. Or you could use a class to collect a new screenshot and use it as an avatar every page load (NOT RECOMMENDED).

If you don't need to collect new screenshots that frequently that they seem live you could make your cronjob run every few hours or days.

mmcdonald 28 Posting Pro

I'll be damned if we didn't, he got every answer about favicon under the sun haha, and I agree with <M/>... it was most likely cached.

mmcdonald 28 Posting Pro

I've put the public link to my profile, can't it just be a typical URL with the target="_blank" attribute Dani?

mmcdonald 28 Posting Pro

Doesn't work for me either, #BugReport :')

mmcdonald 28 Posting Pro

Well I had mine added for 6 months and didn't get one...

(I am taking one for the team!)

I might just ask my 48 indian freelancers to add you now, every 24 hours if you decline, just for the lol's.

mmcdonald 28 Posting Pro

DavidB is spot on :) There are forums full of middle aged munchkins dedicted to legacy technologies and languages - so if you're looking for more activity then that should be your next stop, good luck and have fun!

mmcdonald 28 Posting Pro

Not me - I don't even think people view profiles. I certainly don't xD

mmcdonald 28 Posting Pro

What's wrong with the 'Home Page' field that's available on your profile and your signiature? The Home Page field is perfect for the addition of your blog.

Also, the beauty of friend and connection requests is that they can be declined :D

mmcdonald 28 Posting Pro

It is just fun to stand out :D

Have I missed something...? O.o haha

mmcdonald 28 Posting Pro

@silverrice I don't think that's the case at all... I've never done such a thing and even with the forward slash you're still reading from the same directory?

I usualy use:

<link rel="shortcut icon" href="/favicon.png" type="image/png">
<link rel="shortcut icon" type="image/png" href="http://www.example.com/favicon.png" />

or:

<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico' />
mmcdonald 28 Posting Pro

Don't worry, I flagged it hours ago for a category change xD OP: you need to look into positions on the image and the wrap of the image too.

mmcdonald 28 Posting Pro

OP said:

What if someone who is on my site presses Ctrl + ? And zoom in ? or zoom out?

OP is talking about zoom regardless of device or browser, he's trying to keep an image stuck in one location by the sound sof it (To the nav).

mmcdonald 28 Posting Pro

Well I've always got to what are pretty much the same places whilst taking different routes... you knew what I meant Dani play nice! :D

mmcdonald 28 Posting Pro

@LastMitch - you keep mentioning mobile devices in CSS topics when none of the topics relate to mobile devices, can I ask why?

mmcdonald 28 Posting Pro

You're going to need to add the code, the whole navbar including the image you've added please (Not the actual image, just the code used to insert). Only then can I see where the CSS should be applied.

mmcdonald 28 Posting Pro

Example from MSDN:

DataTable dataTable = new DataTable("Country");
dataTable.Columns.Add("Id");
dataTable.Columns.Add("Name");
dataTable.Rows.Add(45, "Denmark");
dataTable.Rows.Add(63, "Philippines");

comboBox1.DataSource = dataTable;
comboBox1.DisplayMember = "Name";
comboBox1.ValueMember = "Id";

comboBox1.SelectedIndex = 1;
comboBox1.Refresh();

DataRow selectedDataRow = ((DataRowView)comboBox1.SelectedItem).Row;
int countryId = Convert.ToInt32(selectedDataRow["Id"]);
string countryName = selectedDataRow["Name"].ToString();

int selectedValue = Convert.ToInt32(comboBox1.SelectedValue);
mmcdonald 28 Posting Pro

Phorce is correct, this has nothing to do with PHP and will most likely be moved to CSS soon. However, wrapping your image in div tags and setting the nowrap style could solve your problem:

<div style="white-space: nowrap;">
    <img ... />
</div>

I would of course create a CSS class rather than use inline styling but the code above is just a demonstration.

Michael

mmcdonald 28 Posting Pro

Phorce you must have loaded a second after I posted as I edited that extra ']'! You solution stealer!! :D It was a clear typo

mmcdonald 28 Posting Pro

Joshmac - that's not a great error at all :)

Can you catch a clearer error with something like:

catch (PDOException $e){
    echo $e->getMessage();
}

after your query?

mmcdonald 28 Posting Pro

I cant believe I actually didnt click with your issue earlier, sorry!

mmcdonald 28 Posting Pro

Are you trying to acheive something like this:

<?php echo number_format($row_total['sub_total'], 2, '.', ''); ?>

?

From the looks of it you're trying to use the number_format function on an array reference? You should instead call the function on the array variable itself. Does that make sense?

mmcdonald 28 Posting Pro

Would be great to have an error aswell...?

mmcdonald 28 Posting Pro

Did this solve your question Chris?

mmcdonald 28 Posting Pro

I never really look at the footer menu to be honest, I don't think theres anything there I need to use. I will from now on though actually as the forum, unanswered, recently updated and my posts are bloody useful :D

mmcdonald 28 Posting Pro

Yeah you're going to have to slap me as I can't help any further - only ever once looked at VB and immediately reverted back to web programming :) Now there's a better question here with your code another user could potentially help you, sorry and good luck!

Michael

mmcdonald 28 Posting Pro

I would like to help you out blueguy777 but I'm quite inexperienced with multidimensional arrays, perhaps this article could help you?

http://webcheatsheet.com/PHP/multidimensional_arrays.php

I'm actually going to read through that article myself and see if I can grasp it, looks easy enough. Sorry I couldn't help more.

Michael

mmcdonald 28 Posting Pro

Hey don't mention it :D Everyone has a mother tongue buddy! I just misunderstood because of access in the title.

Is this what you're looking for?
http://www.dreamincode.net/forums/topic/74114-a-really-simple-database/

mmcdonald 28 Posting Pro

Ewww Dreamweaver :'(

If you're dealing with currency, which it looks like you are, then you should definately use money_format().

http://www.php.net/manual/en/function.money-format.php

However if you just want want to have a decimal place and not a comma change it to this:

$row_total[ number_format, 'sub_total, 2, '.' ''']; ?>"

Notice the change of the comma to a period :)

mmcdonald 28 Posting Pro

The folder has to be shared so that it can be accessed from the client PC, but if you're trying to simply read from or write to a directory then you'd type the path like so:

\\192.168.1.222\software
mmcdonald 28 Posting Pro

Right forgive me but we're lost in translation. Are you simply trying to display an image in a MS Access database?

If so one simple Google search gave me a million more answers than I needed. Here is one :

http://support.microsoft.com/kb/285820

OR: http://lmgtfy.com/?q=show+image+in+microsoft+access+database

mmcdonald 28 Posting Pro

Haha how have I never seen this link? I was on my HTC One X Plus last night trying to use DW... took me about 20 minutes to reply to AncientDragon :D