blakesmoore
-
Posts
17 -
Joined
-
Last visited
Never
Posts posted by blakesmoore
-
-
Hi,
I have a html form...
<form name="myform" action="blake.php" method="POST">
<textarea cols="40" rows="5" name="domains">
</textarea>
<input type="submit" value="Submit" />
</form>
I want to run a script on the outout of the text area.
I have tried using this for file
blake.php
<?php
$output = shell_exec('expiry '$_POST['domains']'');
echo "<pre>$output</pre>";
?>
But i have no luck...
any ideas?
-
Thanks
-
Hi
I dont understand.
Please can you help further
-
Hey,
Please can you help me, I dont know why this script doesnt work....
index.html (form)
<html> <body> <form action="insert.php" method="post"> <br>Username: <input type="text" name="username" /> <br>Domain Name: <input type="text" name="domain" /> <br>Password: <input type="password" name="pass" /> <br><input type="submit" /> </form> </body> </html>
insert.php
<?php $output = shell_exec('create_hosting '.$_POST['username']' '.$_POST['domain']''.$_POST['password']'); ?>
When i run this i get the below error
The website encountered an error while retrieving /insert.php. It may be down for maintenance or configured incorrectly
-
So what is this script measuring?
-
Hey Guys,
is it possible to embed a .pl script in php
-
Yeah I already incorperated the form
Although, im not sure if it is giving accurate results for loading times?
tools.pingdom.com is giving a totally different result?
-
Thanks for this Dan,
will this tell me how long it takes to load any site that i replace 'http://www.yourURL.com/page.html' with?
-
Hey,
I need to generate a script which tells me how long it takes for an external page to load...
Please can you help?
Thanks
-
Hey,
I would there be a way i could create a form in which upon entering a domain name/URL it will tell you how many connections there are to the site and how many (if any) MySQL queries are running?
If I add this line to a wordpress footer it displays the number of sql queries.
<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.
Any help is greatly appreciated.
Thanks.
-
Thank you so much Pikachu
-
Hey,
I would there be a way i could create a form in which upon entering a domain name/URL it will tell you how many connections there are to the site and how many (if any) MySQL queries are running?
If I add this line to a wordpress footer it displays the number of sql queries.
<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.
Any help is greatly appreciated.
Thanks.
-
Thanks again, have added the @ before the mysql_connect
The connection error message is shorter, but would it be possible to literally just make it say 'Could not connect?'
I don't really understand the timing bit, would it be possible to explain in simpler terms? Sorry about this but i'm only just learning
Thank you for your help!
-
Thanks for the help.
If i enter invalid credentials i still get the warning error, do you know how i could just make this say connection failed?
Also would you know how to add the time it takes to connect to the database?
Thank you so much
-
Hi,
I'm trying to create a form which will test database connection but I'm getting an error. I'm new to php so any help would be appreciated.
form.php
<html> <form action="dbconnection.php" method="post"> <table width="400" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="29%" class="bodytext">Host Name</td> <td width="71%"><input name="server" type="text" id="name" size="32"></td> </tr> <tr> <td class="bodytext">Username</td> <td><input name="username" type="text" id="email" size="32"></td> </tr> <tr> <td class="bodytext">Password</td> <td><input name="password" type="text" id="email" size="32"></td> </tr> <tr> <td class="bodytext"> </td> <td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td> </tr> </table> </form>
dbconnection.php
<?php $server = $_POST['server']; $username = $_POST['username']; $password = $_POST['password']; $link = mysql_connect ('$server', '$username', '$password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); ?>
When submitting the form you get the below error
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host '$server' (1) in /website/public_html/dbconnection.php on line 6Could not connect: Unknown MySQL server host '$server' (1)
If you connect successfully if should echo 'Connected Successfully'
If you cannot connect if should say 'Could not connect'
any advice would be greatly appreciated.
Thanks
shell_exec
in PHP Coding Help
Posted
What is wrong with the code?
any help please?