Yes, I'm confused as well, Dani.
But, thank you. 1024 it is :)
Yes, I'm confused as well, Dani.
But, thank you. 1024 it is :)
Yes, webpage size- Standard sizes?
Dynamic? I don't know!
I have been building websites since 2000 and the one area I have never, ever been able to fully understand is this topic.
I need serious help with this. Explanations. My site(s) to render properly in any browser. No horizontal-scrolling.
I have researched this for 13+ years and still do not fully understand it.
Please help. It is very important!
Thank you in advance, <DANIWEB>.
Matthew
Thank you, JorgeM.
This really further explains the situation to me.
You are always so helpful.
Thank you,
Matthew
[This is theoretical at this point - No code is written for this]
On the project I am building (A forum of sorts) I will be the Admin: I will be the only person able to edit posts. Even the User, save for a 15-minute window (after posting), will not be able to edit their own post.
I need to understand how to set it up so that I have sole admin privileges, being able to post warnings to Users, edit their posts etc.
Thank you for any advice on this!
Matthew
I downoaded http://jqueryvalidation.org/ - One problem I'm concerned with this is: It is jam-packed with folders/files and I am not exactly sure what is needed and what I'll require. Some files I have no clue what they are even.
I will spend time looking into this tomorrow morning, running a test build for it, and report back here with results, success, problems and/or questions.
Thank you,
Matthew
diafol:
I mean a flat alert message by the field. No, not an ugly, intrusive, popup window.
Flat. This site is being designed as super-flat.
Thanks for your help!
JorgeM
I believe I shall try http://jqueryvalidation.org/
I have actually already looked into that one already but gave up out of impatience and frustration.
Honestly, for now, I do not need anything fancy; That can be saved for a future rebuild.
Thanks for all your help!
Matthew
Hello.
I have been doing research for about a week on form validation (JS, jQuery, CSS).
I already have a nice form, but I need to add the validation elements.
I'm a bit stuck.
I know what I do and do not want with the validation:
Want:
* Clean, nice popups. Pretty and visually customizable
* Popup is initiated and displayed when field is blurred with an incorrect value within, for example: email@gmail (Notice, no ".com")
Don't Want:
* The standard, white popup box with an error displayed (I believe that is HTML)
Here is a simple example that I wish to modify from my form:
<label class="grey" for="log">Username:</label>
<input class="field" type="text" name="log" id="log" value="" size="23" />
This does not seem like it would be very difficult, but so far it is appearing to be so.
Any advice, direction or snippets to help me along my way would be very appreciated.
Thank you in advance,
Matthew
After all this time struggling with this issue, a simple mistake.
I neglected to inspect my dbConnect.php file. Duh.
It lacked any form of info related to the countries.
I altered that file and then... It works!
Thank you all for everyone's patience with me and assistance.
Matthew
Yes, Sir, I will try all your suggestion(s).
Thank you for all you time and assistance.
Matthew
Yes, the demo echos the country code-ID.
In my version on my server, it does not.
I am using phpMyAdmin - Not sure where to check the logs using this.
Thanks,
Matthew
I tried it:
My problem is, no matter what I've tried in the last day, I cannot get any sort of country data added to the table; All other submission data is populating DB as expected - No problems.
Thanks,
Matthew
Trying this now...
Will reply with results soon.
Nothing I am trying is working.
Really lost on this one. (And, I know it's something simple)
JorgeM:
Hi.
I made the changes as you suggested, above.
It is still not dumping any country information into the DB.
I am re-reading all my code and looking for errors.
Thank you for your assistance. You're always very helpful.
Matthew
I've gotten myself a bit mixed up, I fear.
I started off thinking I was working in JS, then said, "No, it's HTML."
Some more code (Showing other fields in form:
<!-- Register Form -->
<form method="POST" action="dbConnect.php">
<h1>Not a member yet? Sign Up!</h1>
<!-- Username Field -->
<label class="grey" for="signup">Username:</label>
<input class="field" type="text" name="user" id="user" value="" size="23" />
<!-- Email Field(s) -->
<label class="grey" for="email">Email:</label>
<input class="field" type="text" name="email" id="email" size="23" />
<!-- Password Field -->
<label class="grey" for="email">Password:</label>
<input class="field" type="text" name="pass" id="pass" size="23" />
<!-- Country Dropdown -->
<label class="grey" for="dropdown">Country:</label>
<name="country" id="country" size="23" />
<select name="countries" id="countries" style="width:290px;">
<option value='us' data-image="images/msdropdown/icons/blank.gif" data-imagecss="flag us" data-title="United States" selected="selected">United States</option>
<option value='ad' data-image="images/msdropdown/icons/blank.gif" data-imagecss="flag ad" data-title="Andorra">Andorra</option>
Thank you!
Matthew
Hello.
I am having a bit of trouble with being able to submit/record the data from a selected dropdown field to my DB.
Here is what I know so far:
I am missing something fundamental here.
Here is a snippet (Full code upon request)
function NewUser()
{
$userName = $_POST['user'];
$email = $_POST['email'];
$password = $_POST['pass'];
$country = $_POST['country'];
$query = "INSERT INTO WebsiteUsers (user,email,pass,country) VALUES ('$userName','$email','$password', '$country')";
$data = mysql_query ($query)or die(mysql_error());
if($data)
{
echo "YOUR REGISTRATION IS COMPLETED...";
}
...
<label class="grey" for="dropdown">Country:</label>
<name="country" id="country" size="23" />
<select name="countries" id="countries" style="width:290px;">
<option value='us' data-image="images/msdropdown/icons/blank.gif" data-imagecss="flag us" data-title="United States" selected="selected">United States</option>
<option value='ad' data-image="images/msdropdown/icons/blank.gif" data-imagecss="flag ad" data-title="Andorra">Andorra</option>
I think it has something to do with this:
<label class="grey" for="dropdown">Country:</label>
<name="country" id="country" size="23" />
I am a bit confused as to what I'm doing wrong - Probably something obvious that I'm missing.
Thank you in advance for any help!
Matthew
What I'm having trouble with is calling it from the server into the form.
I'm not exactly sure how to do this.
Thanks,
Matthew
The risk. They did not state the risk. They just said that they read about it somewhere and added "LOL" - No details as why one should not implement this.
A simple problem with a simple solution, I suppose. I have researced it but do not quite understand it.
Problem: I have a very nice script for a dropdown that displays country names and the associated flags for each country within a form. This works very well, but...
Examples of this code show all country/country codes embedded directly into the HTML page. While this works, it may be difficult to manage, it is too long and honestly, plain ugly.
I want to create a .txt file of the country names/country codes that lives on my server and can be called from within the HTML page. Clean.
I have read this is advised against (I do not understand why) - It is simple isolation of text to be called. How can that pose a problem or a risk?
I'm lost at this point as how to do this technically; I am assuming via Javascript/jQuery.
Thank you in advance for all help!
Matthew
JorgeM:
I am looking into CSS Reset - I never knew of this before and it's so important - Thank you.
Q: Should I use the reset code in a seperate CSS file?
Q: This practice will not override my current preset styles, only affect built-in, browser CSS styles?
Q: In my default CCS file, do I apply the reset above each intended element, such as:
*{ margin:0; padding:0; }
p { margin:5px 0 10px 0; }
Would this not render all of my styles defunct?
Also, in the above code snippet, I do not understand the following: "margin:5px 0 10px 0;", why is 0 after 5px and also after 10px? What does that do?
I will wait to implement this until I hear back from you.
Thank you in advance for all your assistance!
Matthew
Thank you, JorgeM! You're awesome.
I'll get back to you on this.
Dani: It is happening constantly to me. Very frustrating.
When I have the time, I will reproduce it multiple times and file an official bug report for you, all steps, browser version(s), OS, line connection speed etc.
My speciality is QA - I will help with this.
Thank you.
Matthew
(I just wrote you a long post, JorgeM, and upon submission, it disappeared - This is an ongoing problem/bug here)
Rewritten, short version:
Thank you for all your help.
I tried you suggestions from your post above.
My URL is (Please note, the project does not launch until 1/1/15, so this page is basically a landing for bots to start indexing - I warn you, it's not pretty!): http://redlinedown.com/
Thank you in advance,
Matthew
Thank you, Sir. I will try your suggestions today.
Matthew
To begin, I have not written any HTML/CSS in about 4-years, so in a sense I'm relearning.
My issue at this point is this:
I want my footer to span the length of the window. Simple enough; But, it is leaving an approximately 10-px gap on the left of the screen.
Here is the the CSS:
footer
{
float: left;
width: 1230px;
padding:40px;
background-color:#c81818; /* the critical component */
border-top: 4px solid #c81818;
border-left: 4px solid #c81818;
border-right: 4px solid #c81818;
border-bottom: 4px solid ##c81818;
margin:0px;
font-family:"Trebuchet MS",Helvetica, sans-serif;
color:#ffffff;
font-size:16px;
}
I will supply the URL or further mark-up upon request.
Thank you in advance!
Matthew
Thank you, Sir. I will read up further on this and report back in due time with any questions/concerns that I may have.
Kind regards,
Matthew
JorgeM and otengkwaku:
Thank you so much for your suggestions and help - I greatly appreciate it and still must research it further, but I am leaning towards using sessions.
Now, a session is created upon login for the User? This session can be stored as a unique identifier for that user which can then be called again when the User logs in, say for a second session (?).
When this User logs in for a second time, I can run a query based on their login credentials, pointing to their session data which is stored with their account info (?)
Yes, I will spend the time to do some good research on this in the next couple of days and report back here with my results from the updated coding.
Thank you again for your help, Friends!
Regards,
Matthew
Hi,
I finally figured out how to take a row from a table and display it on a page. Big deal, huh?
That was not exactly my main goal, though.
When a User submits a form I need that data to display. I've struggled with this.
I now figure that I must somehow base submission display on something unique such as a session or a cookie. (?) I really don't know at this point.
Consider this: 100 people submit at once on my site; How do I display the input from that person and not someone else's input data? This is confusing.
100 people submit and 100 people need to view their data; How do I differentiate between all these people and make sure each person sees their own data and not someone else's?
Thank you for your time.
Matthew
<Closed>
Wait. Doing something wrong in other areas of code I think. Will reply after making adjustments.
I am using mysql_fetch_assoc to retrieve and display an array; This is what I recieve upon loading the page:
Warning: mysql_fetch_assoc() expects parameter 1 to be resource
I have researched it and do not understand it.
**Snippet*
while ($row = mysql_fetch_assoc('$result')) {
echo $row["emp_name"];
echo $row["emp address"];
}
Thank you,
Matthew
I just replied to you and... my reply disappeared... again!
(I am not sure if this is the correct area for this thread - Admin/Mods, please more if necessary. Thank you.)
Hello.
I write a lot of code. I save many back-ups, that is, current versions of the code in case I need to roll-back. This can be quite tedious and time-consuming.
I am looking for a code editor that supports PHP (HTML & Ruby woud be a plus) and saves unique versions of the code automatically, for example, every 5-minutes.
Example:
* I code and save a file named index1.php
* 5-minutes later, a new, unique version is saved automatically, in this case, index2.php
* 5-minutes later, index3.php is created automatically
Does anyone know of such software for achieving this?
Might it be possible to create a Ruby script to modify an editor (Not even sure where to begin with that LOL)?
Thank you in advance.
Matthew
Might this have to do with sessions?
Also, I'm getting many "Notices" about undefined constants, indexes, etc.
Not sure what to do with that at this point.
Yes, the reoccurring issue I have yet to solve: Posting the contents (Saved to a DB) of a form to a redirected page.
Everything works except the rendering of the form data on the redirected page. I've been trying everything that I can think of. I've been researching this for countless hours.
I don't necessarily just want the answer given to me; If you could point out what I'm doing wrong and perhaps a helpful hint, it would be greatly appreciated.
Sloppy, redundant code, below (Sorry, I have not slept working on this issue):
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL | E_STRICT);
$con = mysql_connect("localhost","admin****","*Bridlepath*","test*");
if (!$con)
{
die('NEIN!' . mysql_error());
}
//Connect to DB
$res = mysql_query("SHOW DATABASES");
while ($row = mysql_fetch_assoc($res)) {
echo $row['testTable1'] . "\n";
}
mysql_select_db(test1, $con)
or die("Lost");
echo "<table border='1'>
<tr>
<th>Employee Name</th>
<th>Employee Address</th>
</tr>";
$result = mysql_query("SELECT * FROM testTable1 LIMIT 1") or die (mysql_error());
while($row = mysql_fetch_array($result))
{
echo $row['emp_name'] . " " . $row['emp_address'];
echo "<br>";
}
$result = mysql_query("SELECT * FROM testTable* LIMIT 1") or die (mysql_error());
while($row = mysql_fetch_array($result))
{
echo '<table><tr>';
echo '<td>';
echo '<Strong>Name:</strong><br/>';
echo $row;
echo '</td>';
echo '</tr></table>';
}
mysql_close($con);
?>
Thank you in advance,
Matthew
I want to report a possible issue/bug: I just replied to a post, went to look at a tutorial link, came back to the thread I had created/just replied to, and the reply I made was gone (This has happened before).
Basically, make a reply > leave page > return to page (Refresh page, perhaps) > reply is gone.
Thank you,
Matthew
I just viewed your link on the OO approach. Very nice and educational.
I am trying to envision how this would work with my project. Not sure yet.
Although I am having some issues with the coding, the project is not as large on the back-end as people may assume. I will be storing much data, but the actual processing is simple.
One of my main concerns is security (A topic for a later time).
I will have to keep in mind your fine example of the keycard/lock. How does this relate to this project? (Rhetorical)
I believe this approach may be good when handling the registration of new Users, a process more complex than people think. Plus, I'm building my own, advanced Captcha system, so the OO approach may work there great. Also, I'm designing a security-bot; More on that in the future.
Thank you for your help!
Matthew
I call it "Compartmentalization", that is, taking a long .php file and breaking it down into smaller components; Seperate .php files.
This will keep everything tidier, cleaner, more organized, reusable and I believe, more secure.
Example (Not my code - Maybe not a perfect example of this idea, but for illustration sake):
<?php
$server = "";
$dbuser = "";
$dbpass = "";
$database = "";
?>
What is this called?
Can anyone direct me to an online resource detailing this? Best practices. I need to do this and I need to do it correctly.
Thank you in advance!
Matthew
Thank you, jkon.
Honestly, I have not figured out the details and have not yet started writing the code for this.
The question posted: It just popped into my head while coding something else; I wanted to be sure not to forget this question, so I immediately posted it.
Kind regards,
Matthew
A simple question (One which I do not have the answer to yet).
One small yet important aspect of my current project is collecting IP addresses via email registration/email confirmation.
I assume seeing an IP is not difficult (User's email header?)
My question is:
Is this IP the IP of the server hosting the email service (For example, GMail) or is it the actual email of the User, that is, coming from their actual connection on their machine? I need the User's home/machine IP, not the email Host's.
Thank you in advance.
Matthew
This a great thread. Many concerns addressed and answered.
I am working on the same sort of login system.
I just wrote a long response to this topic, posted and it... disappeared(?)
I die and my energy becomes one with the Gods/Godesses/Non-Terrestrial Scientists, pure energy reformed in a new dimension, eternally.
In the mean time, I practice the ancient ways as an advanced Mammal may.
Our finite brains cannot understand or express the details. Cave paintings on French, stone walls, Plato and Metaphysics, our closest reach.
Matthew
I shall be doing this soon, that is, procuring a permanent paid host + business email via host.
Q: If I provide a simple contact link/form through my future site, it handled by the host via their servers, I presume? Is this what this thread is addressing? Are there other methods?
Thank you,
Matthew
This is the current code on the new server that is throwing the connection error:
<?php
ob_start();
?>
<html>
<body>
<form method="post" action="<?php $_PHP_SELF ?>">
<table width="400" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="100">Employee Name</td>
<td><input name="emp_name" type="text" id="emp_name"></td>
</tr>
<tr>
<td width="100">Employee Address</td>
<td><input name="emp_address" type="text" id="emp_address"></td>
</tr>
<tr>
<td width="100"> </td>
<td> </td>
</tr>
<tr>
<td width="100"> </td>
<td>
<input name="add" type="submit" id="add" value="Add Employee">
</td>
</tr>
</table>
</form>
<?php
$con = mysql_connect("server26.grendelhosting.com","u871385583_*", "*********");
if (!$con)
{
die('NEIN! ' . mysql_error());
}
//Connect to DB
$res = mysql_query("SHOW DATABASES");
while ($row = mysql_fetch_assoc($res)) {
echo $row['Database'] . "\n";
}
mysql_select_db(u871385583_*, $con)
or die("Lost");
//Detect DB
$sql="INSERT INTO tab3(emp_name, emp_address)
VALUES
('$_POST[emp_name]','$_POST[emp_address]')";
if (!mysql_query($sql,$con))
{
die('Error:' . mysql_error());
}
//Add entry to DB
?>
<?php
$redirect_page = 'www.bridlepath2.grn.cc/index1.php';
$redirect = true;
if ($redirect == true AND !empty($_POST)) {
header("Location:$redirect_page");
}
ob_end_flush();
?>
Receiving this upon run:
Warning: mysql_connect(): Host 'srv26.main-hosting.com' is blocked because of many
connection errors; unblock with 'mysqladmin flush-hosts' in
/home/u871385583/public_html/ob_re4.php on line 32 NEIN! Host
'srv26.main-hosting.com' is blocked because of many connection errors;
unblock with 'mysqladmin flush-hosts'
I am not sure about how to go about flushing the host, as the host is remote (Not my own server).
I am using MySQLAdmin - Am I to do this from within MySQLAdmin? How?
Any advice would be greatly appreciated.
Thank you in advance,
Matthew
[Marking as Solved]
phorce surmised that the issue is with my host after having access to my DB; Therefore, I am moving to a new host for further testing.
In a week I will have a permanent domain for my company and a 5-year hosting plan within a proven and stable server-farm(s).
Any futher questions I may have (And I will have some), I shall start a new, fresh thread for.
Thank you all for your kind and caring help. It means a lot!
Regards,
Matthew
phorce:
Thank you so much!
Via PM, I shall send you all full admin credentials.
(After I send the credentials I will not touch the DB for a number of hours, allowing you a chance to review it)
Cheers!
Matthew