|
The element you need for that is <label>[^]
|
|
|
|
|
Thank you very much for your help!
|
|
|
|
|
HTH[^]
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Thank you Luc...
I've searched for that before, but it is a pity not to speak english as the first language... I've tried a big set of strings without any good result...
Anyway, I've got help here as always!
Regards!
|
|
|
|
|
I have a two column page that am desperately trying avoid using an IFRAME as the target. I have spent the last two days unsuccessfully.
Is there anyone who has this problem solved or knows where or how to solve it.
Any help is greatly appreciated.
|
|
|
|
|
So what's the problem? Indeed, what is your question?
I just hope the lithium polymer cells in my Code Project Mind Reading Unit still have some charge left in them
Do I understand you to be saying that you have a 2 column layout using divs, and you'd like to perform some ajax work and would like to display the results in one of these two columns - but would like to avoid the use of an iframe as the target of the results of the ajax call?
As it stands, what it is that you would like to know is entirely unclear.
|
|
|
|
|
Am not getting your question clearly but hope this will help you...if not just say it..
you would like to create two columns with different content sources lets say an external page[.php,.html .. e.t.c].
For my web apps this is what i do:-i will use an example:
==>supposing this is my index.php file ===
<div1> [Shows my page header] </div>
<div2> [Shows my page content] </div>
<div3> [Shows my page footer content] </div>
Content posting --
--create your header.php file
--create your footer.php file
NB: save all the includes pages in one directory like /inc/...>
to show the header content this is what i will do: using php
===and my content will be displayed in here
do the same for other pages
==HOPE THIS HELPS ==
|
|
|
|
|
Curious, what are useful things you've used Perl for and why did you choose Perl over any other language?
|
|
|
|
|
I use it for things like build scripts[^]. Basically, Perl is a glue script that runs various other pieces of the system.
Albert Holguin wrote: why did you choose Perl over any other language
It is widely deployed, easy to use and samples are all over the internet.
|
|
|
|
|
I'm currently using it for automatic nightly builds, but I want to see what else people are using it for... thanks for the feedback though!
...Oh, I'm also using it to help our production guys make software licenses easily with very few options (since they're not very tech savvy)...
|
|
|
|
|
I use it for quick and dirty searches on "many" large text files. I use it when I need the power of RegEx and need to do it quickly. Overall, text file manipulation is quite easy and quite powerful. Some of our in-house software runs on Perl scripts as well.
Important note: If I am going to need to go a few steps more than I will write it in C#...usually.
|
|
|
|
|
does it do searches fast? ...or do you use it because its easy to code searches? I've actually thought about making some perl scripts to help manage my music libary, but its a ~40GB library, so I'm worried about efficiency with A LOT of files.
|
|
|
|
|
Albert Holguin wrote: does it do searches fast?
Extremely fast...at least on my system at work.
Albert Holguin wrote: or do you use it because its easy to code searches?
Once you get the basics down for Perl, writing a general search script is easy to do. Code reuse makes it even faster.
|
|
|
|
|
|
Some years ago now but I needed to access machine files over a large private network from multiple platforms, Windows, SUN systems, straight UNIX, IRMX and others. I used pearl to examine the data, formatted differently on each of these platforms and produce an HTML output that was available as a sort of web site, not a proper one with servers and internet, but enabled users all over the UK saw it like a web site.
A small C++ app kicked the process into life every night and this system accessed several hundred machines, also all over the UK, and updated the HTML pages.
Pearl is fast and, albeit a bit write only, very good at handling this sort of heavy text manipulation process.
|
|
|
|
|
*Perl* .... thanks for your feedback, but why a C++ app and not just a task/cronjob or what not?
|
|
|
|
|
I use perl for the following
1. One shots to munge data
2. Producing runtime specific data that is tailored to the environment.
3. Code generation.
The reason is that the alternative languages would require more infrastructure work to get to the point where I was actually achieving the intended goal.
|
|
|
|
|
|
An example.
1. Source code is a SQL schema or a file that represents a data model.
2. Perl code is used to generate the following
a. CRUD stored procedues.
b. DTO classes.
c. DAO classes.
To update one changes 1, then runs the script.
|
|
|
|
|
Hi im trying to get my calender to display on the website but it is showing errors such as this:
Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'joeuser'@'localhost' (using password: YES) in C:\wamp\www\prog\addeventcal.php on line 8
Notice: Undefined variable: m in C:\wamp\www\prog\addeventcal.php on line 26 & 27 & 28
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in C:\wamp\www\prog\addeventcal.php on line 29
here is my code. Can you please explain as to why it is not working. thank you
<html>
<head>
<title>Show/Add Events</title>
<head>
<body>
<h1>Show/Add Events</h1>
<?php
$mysqli = mysqli_connect("localhost", "joeuser", "YES", "testDB");
if($_POST){
$m = $_POST["m"];
$d = $_POST["d"];
$y = $_POST["y"];
$event_date = $y."-".$m."-".$d." ".$_POST["event_time_hh"].";
".$_POST["event_time_mm"].":00";
$insEVENT_sql = "INSERT INTO calender_events(event_title, event_shortdesc, event_start) VALUES('".$_POST["event_title"]."';
'".$_POST["event_shortdesc"]."', '$event_date')";
$insEvent_res = mysqli_query($mysqli, $insEvent_sql)
or die(mysqli_error($mysqli));
}
$getEvent_sql = "SELECT event_title, event_shortdesc,
date_format(event_start, '%l:%i %p') as fmt_date FROM
calender_events WHERE month(event_start) = '".$m."'
AND dayofmonth(event_start) = '".$d."' AND
year(event_start)= '".$y."' ORDER BY event_start";
$getEvent_res = mysqli_query($mysqli, $getEvent_sql)
or die(mysqli_error($mysqli));
if(mysqli_num_rows($getEvent_res) > 0){
$event_txt = "<ul>";
while($ev = @mysqli_fetch_array($getEvent_res)){
$event_title = stripslashes($ev["event_title"]);
$event_shortdesc = stripslashes($ev["event_desc"]);
$fmt_date = $ev["fmt_date"];
$event_txt .= "<li><strong>".$fmt_date."</strong>:
".$event_title."<br/>".$event_shortdesc."</li>";
}
$event_txt .= "</ul>";
mysqli_free_result($getEvent_res);
}else{
$event_txt = "";
}
mysqli_close($mysqli);
if($event_txt != ""){
echo "<p><strong>Today's Events:</strong></p>
$event_txt
<hr/>";
}
echo "
<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">
<p><strong>Would you like to add an event?</strong><br/>
Complete the form below and press the submit button to add
the event and refresh this window.</p>
<p><strong>Event Title:</strong><br/>
<input type=\"text\" name=\"event_title\" size=\"25\"
maxlenght=\"25\"/>
<p><strong>Event Discription:</strong><br/>
<input type=\"text\" name=\"event_desc\" size=\"25\"
maxlength=\"25\"/>
<p><strong>Event Time (hh:mm):</strong><br/>
<select name=\"event_time_hh\">";
for($x=1; $x <= 24; $x++){
echo "<option value=\"$x\">$x</option>";
}
echo "</select> :
<select name=\"event_time_mm\">
<option value=\"00\">00</option>
<option value=\"15\">15</option>
<option value=\"30\">30</option>
<option value=\"45\">45</option>
</select>
<input type=\"hidden\" name=\"m\" value=\"".$m."\">
<input type=\"hidden\" name=\"d\" value=\"".$d."\">
<input type=\"hidden\" name=\"y\" value=\"".$y."\">
<br/><br/>
<input type=\"submit\" name=\"submit\" value=\"Add Event\">
</form>";
?>
</body>
</html>
|
|
|
|
|
Your database connection is failing, which is causing some of your problems. Are you sure the password is "YES"? Does "joeuser"@"localhost" have permission to use the "testDB" database?
The "undefined variable" message is probably because you are using $m (and $d , $y ) to construct a query using them when they have not been defined. You are only defining them inside the if($_POST) { ... block, so if the page is loaded without POST data then they will be undefined.
|
|
|
|
|
o ok. that makes sense! i went back through my code and added in a $_GET to get the $m, $y, and $d. I also changed it from joeuser to root and password to "" since there wasnt a password set up. I found that I wasnt calling my database by the right in the connection call. Thank you for your help!
|
|
|
|
|
The problem is that your app[web page] doesn't create a successful database connection before passing you query statements to fetch data from the db::
//make sure you are using the correct user and password:
//if you are using any Apache servers like xampp,wampp.. and you never supplied your password later on ,then the default credentials to connect to your db is:====>
$host="localhost";
$user="root";
$password="";
$con = mysql_connect($host,$user,$password);
if(!$con){
echo "SERVER CONNECTION FAILED : source =".mysql_error();
exit; //remember this avoid any further page processing...
}
|
|
|
|
|
Hello again,
I'm trying to handle the language setting from the user. For that I've created a variable that I'm using in all the PHP files I have: $MyLangVar .
I would like to assign a default value to that variable to i.e. english.
So I've done this in my initialize file (a file that is being included by all the other files in the web site):
<?php
include($_SERVER['DOCUMENT_ROOT'].'/important_file_for_all.php');
if (!isset($GLOBALS['MyLangVar'])
{
$MyLangVar = "English";
}
?>
Both attempts have not worked properly IN THE 404.PHP PAGE.
At the beginning of each file I have this line: $MyLangVar = $GLOBALS['MyLangVar'];
How should I do this?
Thank you in advance.
[www.tamelectromecanica.com] Robots, CNC and PLC machines for grinding and polishing.
modified on Wednesday, March 30, 2011 2:16 PM
|
|
|
|
|
Where is the $MyLangVar declared? if it is inside the if statement it could be lost after the if statement is completed.
|
|
|
|