-
Posts
1,437 -
Joined
-
Last visited
Never
Posts posted by papaface
-
-
Well what went wrong?
We're not mind readers.
-
This is a HTML problem, not PHP.
-
-
Maybe:
<? $urls = 'http://go.google.com/google.com'; echo pathinfo($urls,1); ?>
Is that what you are looking for?
-
-
try:
echo "<input type=\"text\" name=\"question\" size=\"25\" value=\"" . $rows4['question'] . "\">";
-
Your code should work.... hmmm...
-
Use CSS to make the text in the box white (or match the bg colour).
-
-
$error = header("Location: banned.php?user=".$user_name."")
should be:
$error = header("Location: banned.php?user=".$user_name);
Try that.
-
$newstring = substr($oldstring,0, 200);
That won't work as it counts from the end.
-
<?php $cut = substr("somthing200charslong",0,200); echo $cut; ?>
-
Answered many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many many times. Try google or forum search:
-
An idea generator.
Should be quite simple to do I think.
-
papaface: what guarantees that those random numbers are different?
Nothing, I suppose lol.
-
I'd do:
<?php $i = 0; while ($i < 4) { echo rand(0,100) . "<br />"; $i++; } ?>
or:
$rand = array(rand(0,100),rand(0,100),rand(0,100),rand(0,100)); foreach ($rand as $val) { echo $val . "<br />"; }
or:
$rand1 = rand(0,100); $rand2 = rand(0,100); $rand3 = rand(0,100); $rand4 = rand(0,100); echo $rand1 ." ". $rand2 ." ". $rand3 ." ". $rand4;
-
Restart the server!? How come cPanel is able to acomplish this without having to restart the server (or am I deeply mistakened)?
I just want to put addon domains for different users automatically via PHP as they submit them and change their nameservers.
I'm guessing I would have to create a desktop application and then use exec() to call it to do the job? I'm not looking for any quick tricks in PHP to do this as I know it will mean work and I am willing to spend time into researching and doing this properly along with the rest of the project I am doing.
I'm sure cpanel does restart apache when a new domain is added.
-
-
Should be:<?php session_start(); if ( $_SESSION['count'] == "1" ) { header("Location: www.website.com"); } ?>
[<?php session_start(); if ( $_SESSION['count'] != "1" ) { header("Location: http://www.website.com"); } ?>
-
Yeah, you can do that, but that just means the index page will get a lot of data passed to it. By the way, that method isn't the best solution. It'll make the index page a b*tch to code.
Not necessarily if you code it correctly.
I would do something like:
Index.php:
<?php if (strlen($_GET['p']) > 0) { switch($_GET['p']) { case "register": include("register.php"); break; case "login": include ("login.php"); break; default: include ("indexpage.php"); } } else { include ("indexpage.php"); } ?>
Pretty simple in my opinion. Just code the pages separately but include them as one page using switch and NOT if statements.
-
Should be:echo "onclick=\"location.href='http://www.ezarttrader.com/sellart.php'\"";
echo "onclick=\"location.href='http://www.ezarttrader.com/sellart.php';\"";
-
Ignore me lol
-
-
<?php function test() { // get the array name $array_name = 'foo'; // initiate all elements to be zeros for ( $i=1;$i<=10;$i++ ) { $$array_name[$i] = ''; } // assign each element of array a value for ( $i=1;$i<=10;$i++ ) { $$array_name[$i] = 'bar' . $i; } return $array_name; } $test = test(); print_r($test); ?>
Do you mean like that?
[SOLVED] Gathering personal message data; Echo it
in PHP Coding Help
Posted
Actually I'd typed that before you updated it. The time taken to post is the 2 second difference between my post and your edit!