|
I'm not an expert in asp.net, but PHP is just server side, so if you need to get the info back to the client browser, you'll have to do something else, like use AJAX.
I have a user registration web page embedded in a PHP script (or PHP in a web page -- depends on your viewpoint) with a parameter indicating an error message. The first time you call the web page, the error message is blank so nothing is displayed.
If the registration succeeds, the PHP script redirects to a login or a secure page. If it fails it reloads the registration page again with a message that the user name is already taken (or database in unavailable, or password was blank, etc.).
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Walt this is great..
I really appreciate your assistance.
I will look to implement this later today..
Could you answer a resource question..?
I noticed a site called PHPLabs, they claim to have lots of goodies and great support for PH issues.
Do you know anything about them?
Thanks..
Chuck..
|
|
|
|
|
I'm glad my suggestions may have helped. To me, the registration and login is just the first hurdle -- after that you probably need to maintain session info, and doing that securely offers other challenges!
I've never heard of PHPLabs before. I see they want to charge to be a member, so I don't think I'm interested. So far I've always found answers to my PHP questions using Bing (or Google). If you decide to delve into PHPLabs, I'd be happy to hear what you think.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Thanks Walt..I'll probably save my money for now...
|
|
|
|
|
|
Thanks Richard..
I'll look into these sites..
Cheers..
Chuck..
|
|
|
|
|
Hi Experts,
Please let me know if any method is there to convert .json file to .po/.pot file in python script.. I have used Gettext library to parse po files and convert it to .json. But can't found any one to parse po files...
Regards,
Spk
|
|
|
|
|
Hi,
I want a PHP script to run multiple batch files.
The batch files are doing the same job but for different files.
I don't want to create several scripts to do the same job.
Any idea is welcome.
|
|
|
|
|
Not knowing exactly what task or tasks you wish to batch perform, and not being a mind reader, may I suggest you visit web sites such as http://www.hotscripts.com/category/php/[^] and look to see if anything there (or elsewhere for that matters) jumps up and says "try me"!
modified 1-Aug-19 21:02pm.
|
|
|
|
|
The script is as shown below
<?php
session_start();
$userid=$_SESSION['userid'];
$res=exec('bat\diff_coursework.bat',$shell);
echo '<a href="content/differentiation_coursework/main.pdf"><input name="Download" type="button" value="Download" />';
include ("config.php");
$query="insert into access values('$userid','differentiation','coursework',NOW())";
mysql_query($query);
?>
It calls the batch file diff_coursework.bat and then display a download button for the main.pdf file.
I have several files to be run the same way therefore I need a general script for that instead of creating a new script for every file.
|
|
|
|
|
since this part is just a string being passed
'bat\diff_coursework.bat'
maybe an array might help
$bats_arr = array('diff_coursework.bat','diff_coursework2.bat','diff_coursework3.bat', etc....);
foreach($bats_arr as $bat_file)
{
$res=exec('bat\'.$bat_file,$shell);
}
|
|
|
|
|
Have you tried to implement this?
This will run all the bat files every time it is called.
I want it to be able select the bat files to run.
Thanks for the idea
|
|
|
|
|
Then in your code reference the array by the index via a link.
That will give you the selection you want and a single file to manage them all.
|
|
|
|
|
Hi guys i have this small class task that i'm having trouble with. I need to create a PHP file using SAX to generate the display shown below from an XML file.
*** This is the xml source code from which i need to generate the display: ***
<orders>
<order>
<count>37</count>
<price>49.99</price>
<book>
<isbn>0130897930</isbn>
<title>Core Web Programming Second Edition</title>
<authors>
<count>2</count>
<author>Marty Hall</author>
<author>Larry Brown</author>
</authors>
</book>
</order>
<order>
<count>1</count>
<price>9.95</price>
<yacht>
<manufacturer>Luxury Yachts, Inc.</manufacturer>
<model>M-1</model>
<standardFeatures oars="plastic" lifeVests="none">false</standardFeatures>
</yacht>
</order>
<order>
<count>3</count>
<price>22.22</price>
<book>
<isbn>B000059Z4H</isbn>
<title>Harry Potter and the Order of the Phoenix</title>
<authors>
<count>1</count>
<author>J.K. Rowling</author>
</authors>
</book>
</order>
*** what the expected output to look like below. ***
[IMG]http://img13.imageshack.us/img13/6950/75914446.jpg[/IMG]
|
|
|
|
|
Hi,
I try to execute a php code that stop when find a ">" char.
I new in web developing and i think that my feel experiencie is the real problem.
some one can help me ?
The messege i received on top of the page in preview is
setQuery("*", "people"); // If were called using ajax, only display the table, not the page body if > (EyeDataGrid::isAjaxUsed()) { $x->printTable(); exit; } ?>
The code i wish to execute is:
<?php
require 'class.eyemysqladap.inc.php';
require 'class.eyedatagrid.inc.php';
// Load the database adapter
$db = new EyeMySQLAdap('localhost', 'root', '', 'codes');
// Load the datagrid class
$x = new EyeDataGrid($db);
// Set the query
$x->setQuery("*", "people");
// If were called using ajax, only display the table, not the page body
if (EyeDataGrid::isAjaxUsed())
{
$x->printTable();
exit;
}
?><HTML><HEAD><TITLE>EyeDataGrid Example 1</TITLE><LINK href="table.css" type=text/css rel=stylesheet><META content="MSHTML 6.00.6002.18130" name=GENERATOR></HEAD><BODY>
<H1>Basic Datagrid</H1>
<P>This is a basic example of the datagrid</P>
<?php$x->printTable();
?>
</BODY></HTML>
|
|
|
|
|
Can you please post the error message with error line number?
Also please check is there any whitespace before <?php , if there is any then try removing it.
http://www.halalit.net
|
|
|
|
|
just a basic look at the code it seams that you are missing a space in this part of the code.
<?php$x->printTable();
try
<?php $x->printTable();
|
|
|
|
|
I can't understand the question/problem, but the cjoki is right. You must format the code more clearly and carefully. There isn't white space betwen <?php$x->printTable(); ...
|
|
|
|
|
Whats the entry point in the linux kernel?
|
|
|
|
|
|
|
The only things that worries me: Why do you want to know???
That's why I gave short, albeit correct answer...
|
|
|
|
|
Just for my knowledge .
|
|
|
|
|
how to copy directory from one webstie to other using ftp? like :-
I am at http://ab.com
Now i want to copy directory b of http://abc.com/a/b to http://ab.com/data/
|
|
|
|
|