-
Posts
1,216 -
Joined
-
Last visited
Everything posted by WebStyles
-
HELP! Some sort of PHP cron task kill script needed ! ! !
WebStyles replied to Vixushr's topic in PHP Coding Help
there's a forum here dedicated to freelancers. Post your ad there and you'll get loads of people willing to do the job. -
HELP! Some sort of PHP cron task kill script needed ! ! !
WebStyles replied to Vixushr's topic in PHP Coding Help
like I said 2 days ago: If you're not a coder, maybe you should hire one to fix things for you before they get out of hand. -
you mean you changed the backslashes to forward slashes
-
if this works: file_exists('../lib/menu.xml') and this doesn't: simplexml_load_file("..\lib\menu.xml") I would try changing the backslashes to forward slashes. (I'm guessing your machine at home is Windows based, and the server is Linux)
-
I answered that in my previous post. check out the code I posted.
-
if($row_detail['des1']==".."){ ..... you're using 3 different variables names, I assume it's a typo ? but you actually have them all over the place. $row_detail, $row_detailis, $row_details (which one is correct ?)
-
So... you tried it once, and it worked... you tried it a second time and it failed... ... What did you change between the first and second attempts?
-
Would you like us to guess, or can we see the actual code? this error seems quite straight forward: "(...)in /home/ogwareco/public_html/menu.php on line 2" Guess 1: Whatever is on line 2 of menu.php (probably an include or require ) is pointing to a file that you did not upload, or is in the wrong place.
-
Index. PHP Error Message. Lost Depsearte for Help!
WebStyles replied to scottmmx's topic in PHP Coding Help
I Agree with Jumpy09. this: (line 16 of your file) define('JPATH_BASE', dirname(/home/users/web/b195555/jpg.atlanticdrivingschoo) ); should be : define('JPATH_BASE', dirname("/home/users/web/b195555/jpg.atlanticdrivingschoo") ); P.S. are you really coding in MS Word ? -
this: $stmt = $dbh->prepare("INSERT INTO mypictures (pic_type , picture, pic_size, pic_name, pic_desc, sixval) VALUES (? ,?, ?, ?, ?, ?)"); is obviously incomplete. you need to put in your variables instead of the question marks.
-
well, I got all that from your previous little bit of code, my question was simple: I just wanted to know if the article title is what you also want to use as a page title... I'll assume it is. Since you're grabbing the articles from the database and creating links to them, you could just add the title to the links, so instead of: echo '<a href="index.php?proc='.$row['id'].'">'.$row['article_title']. '</a>' . "<br />" . substr($row['article'], 0, 250). '...' ; you would have: echo '<a href="index.php?proc='.$row['id'].'&title='.$row['article_title'].'">'.$row['article_title']. '</a>' . "<br />" . substr($row['article'], 0, 250). '...' ; and then all you need to do is: <title> <?php echo isset($_GET['title']) ? $_GET['title'] : 'YOUR DEFAULT TITLE HERE'; // for when no article is selected ?> </title>
-
and is $row['article_title'] what you want to use as the page title when the link is accessed?
-
try something like this: $rt=mysql_query("YOUR DATABSE QUERY HERE"); while($dr = mysql_fetch_array($rt)){ echo '<a href="script.php?event='.$dr['event_name'].'&town='.$postLoc.'">'.$dr['event_name'].'</a><br>'; } P.S. where does $postLoc come from ?
-
you could have an array in your session (or somewhere else, external file, included in index, etc...) that translates page names to page titles. then on each load, you just check the page name, and grab the appropriate title. how are you linking from page to page? (since you're including page1.php in index, i assume you've got a structure like: <a href = "index.php?page=page1"> ??
-
anyway you look at it, you will need to define the page title BEFORE your <title> tags.
-
you're including the header.php twice, once in index, and then again in page1. remove from index. (since page1 is where you have the variable with the actual title)
-
Several issues here, I'll post a few: 1. why is this duplicated? if( isset($_POST['username']) && isset($_POST['username']) ) 2. mysql_escape_string is depricated. 3. while($row = mysql_fetch_assoc) has no query associated to it. 4. if($edie = 1&&$dbVN=0) should be if($edie == 1 && $dbVN == 0)
-
if else statement, $_FILES getting uploaded
WebStyles replied to $php_mysql$'s topic in PHP Coding Help
what else did it say? you have so many echo's in there, if the file was uploaded, it must have echoed something else. -
if else statement, $_FILES getting uploaded
WebStyles replied to $php_mysql$'s topic in PHP Coding Help
well there's your answer then. -
when you create the cart: //RUN IF THE CART IS EMPTY OR NOT SET $_SESSION["cart_array"] = array(1 => array("item id" => $pid, "quantity" => 1)); you're using 'item id', but then you want to see it, you add an underscore: 'item_id'... that's why it says your variable is not defined. you're using the wrong name.
-
if else statement, $_FILES getting uploaded
WebStyles replied to $php_mysql$'s topic in PHP Coding Help
Again? This question has been answered for you in your previous post. Put up some echoes to find out where your problem is: echo $file['image']['type']; what's the result ? -
Differences Between Regular Users and Admin users
WebStyles replied to Superman702's topic in PHP Coding Help
just grab the variable from the database, the same way you grab the other info and check it before redirecting: (I would store it in a session variable to use later.) if($info['Admin'] == 1){ // redirect to admin page }else{ // redirect somewhere else } -
I guess the whole point here (of the original post) was passing a variable to the next page without it being in plain sight ( ? ). If so, you can simply store it in a $_SESSION variable and retrieve it on the next page. If you want it to look cool and encrypted, you can use your md5 hash as a session variable name: If they're links you wish to send out in emails, that are supposed to be unique, you can do the same thing, but store the hashes and values in a database instead of session. <?php session_start(); $link = md5($random); // I'm not sure on how md5 is setup that goes. $_SESSION[$link] = $random; echo "<a href='random.php?xyz=$link'>Click here yo!</a>"; ?> on next page, you can retrieve the value of $random with: <?php session_start(); echo $_SESSION[$_GET['xyz']]; ?>
-
you could do this: $name = str_replace(" s","'s",$_GET['name']); so only spaces followed by an 's' get replaced. Not brilliant, but it will work in your case.
-
HELP! Some sort of PHP cron task kill script needed ! ! !
WebStyles replied to Vixushr's topic in PHP Coding Help
well, that's it... (when the value in the text file is 0, the cron job won't execute, when the value is 1, it will. you can use the 2 last scripts to enable and disable the cron job whenever needed.)