-
Posts
783 -
Joined
-
Last visited
Everything posted by ZulfadlyAshBurn
-
Call javascript function from php echo href
ZulfadlyAshBurn replied to anton_1's topic in Javascript Help
whats the code for your onClick function? if you are using onclick to run a php code directly, its not possible. You would need to use ajax for this. -
exclamation marks are not allowed as a file name?
-
Call javascript function from php echo href
ZulfadlyAshBurn replied to anton_1's topic in Javascript Help
here is the correct method. <script type="text/javascript"> function showDialog() { $('#box').fadeIn(250); $('#box').fadeTo(0.5); } function hideDialog() { $('#box').fadeOut(250); } </script> <?php $strLink = "<a href='viewTicket.php?id=" .$row['id']. "'>" .$strName. "</a>"; ?> it should work -
..... $connection = mysql_connect($host,$user,$pass) or die (mysql_errno().": ".mysql_error()."<BR>"); mysql_select_db($dbname) or die (" Cannot find database"); $sql = "SELECT * FROM orderTable WHERE orderNum = '". $order ."' AND custUsername = '". $username ."' AND custPassword = '". $userpass ."'" or die ("Cannot find table"); $query = mysql_query($sql); if(mysql_num_rows($query) < 1) { echo "<h1>Error Status</h1>"; echo "Error!"; } while ($row = mysql_fetch_array($query)) { ?> <html> <head> ....
-
Ummm, hmmmm... thanks to you that i tried out what you actually said. maybe he didnt understand your said o.0
-
use if and else to check the data that is being passed.
-
do you know how to do it or you are asking us for help?
-
ok, i've tried this and its working. change your code to this. <textarea id="address"> <?php echo $paypalrow['firstName']."\n"; echo $paypalrow['shipToStreet']."\n"; echo $paypalrow['shipToCntryCode']."\n"; echo $paypalrow['shipToZip']."\n"; ?> </textarea>
-
what is your current code?
-
ehy not just use </br> instead of nl2br? echo $paypalrow['shipToZip']."<br/>";
-
creating a php script that generates two number is rather easy. i have done it and tested it. its working <?php session_start(); $maths = $_REQUEST['maths']; if(isset($maths)) { $sum = $_SESSION['sum']; if($maths == $sum) { echo "Correct "; } else { echo "Wrong "; } } else { $n1 = rand(1,10); $n2 = rand(1,10); $sum = $n1 + $n2; $self = $_SERVER['PHP_SELF']; $_SESSION['sum'] = $sum; echo "<form action='" .$self. "' method='post'/>". $n1 . " + " . $n2 . " =<input type='text' name='maths'/><input type='submit' value='submit'/></form>The correct answer would be: " . $sum; } ?> as for ppl spamming your site: if they are allowed to register on their own, they are able to do anything to the contact form. else, they can still get the url/page which sends you the data and send it
-
both of them are php5 thus i dont think there would be any errors.
-
why would you need to lower down the php version?
-
you didnt close any of your input tags? anyway its form not from tag. change your page to this code. <?php $return = $_POST['return']; $name = $_POST['name']; $username = $_POST['username']; $password = $_POST['password']; $rpassword = $_POST['rpassword']; if($return) { //this is just to output what the user enterd so that i can see if its working but is not... echo $username. "/" .$name. "/" .$password. "/" .$rpassword; } ?> <html> <form action='Register.php' method='POST'> <table> <tr> <td> <font face='arial'/> Enter Name: </td> <td> <input type='text' name='name'/> </td> </tr> <tr> <td> <font face='arial'/> Enter username: </td> <td> <input type='text' name='username'/> </td> </tr> <tr> <td> <font face='arial'/> Enter password: </td> <td> <input type='password' name='password'/> </td> </tr> <tr> <td> <font face='arial'/> Enter password again: </td> <td> <input type='password' name='rpassword'/> </td> </tr> </font> </table> <p> <input type='submit' name='return' value='Register'/> </p> </form> </html> edit: i re-edited the script. please use the new one
-
Get path to a file when directory name in unknown
ZulfadlyAshBurn replied to ffmus123's topic in PHP Coding Help
php file exists -
Send form to .php, prevent redirection with ajax
ZulfadlyAshBurn replied to anton24's topic in Javascript Help
Basically, you want to have a ajax form. Its easy this page has a good tutorial Open.JS -
1) Create a user session when they logged-in. 2) Call the session on the members page.
-
cool, i'll go read it. but for how do i make sure that all errors are forwarded to me and make the page unavailable to users if there is error.
-
Locally: headers(); place in middle of the page etc, it can work. Online: Cannot modify header information - headers already sent by (output started at /home/***/public_html/***/index.php:9) in /home/***/public_html/***/index.php on line 186
-
error_reporting(E_ALL); ini_set('display_errors', '1'); i use this code?
-
check the tutorial here, hope it helps File Upload
-
sorry for the spelling error, *which. HAHA. erm, its usually some on my local server, I can place headers somewhere in the middle of the code for redirection. but when i upload to my server, it disallows.
-
i check my scripts before transferring to my server. but sometimes, my server displays unwanted glitch witch doesn't happen locally.
-
Does anyone knows how to create their own debugging script for php? The only thing that I am able to do now is when a user encounter an error when browsing the site, the user will still see the page but with error while an email is being send to me at the same time. Is there anyway to prevent this from happening?