PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 20th, 2013, 07:44 AM
w3l54666 w3l54666 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 52 w3l54666 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 14 h 19 m 25 sec
Reputation Power: 1
New to php, problems moving my code to a new site as layout is different.

hey guys,

im new to php, i have a code in my old site that uses the mysql db on my server, but seeing as the new site is a different layout im flummuxed on how to change it.

the code was written by a friend of mine and atm he is quite busy so no chance of getting hold of him.

any help would be greatly appreciated

Reply With Quote
  #2  
Old February 20th, 2013, 08:41 AM
gw1500se gw1500se is online now
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2003
Posts: 2,875 gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Year 1 Week 6 Days 1 h 5 m 57 sec
Reputation Power: 581
Based on what you posted, what exactly are you expecting someone to tell you?
__________________
There are 10 kinds of people in the world. Those that understand binary and those that don't.

Reply With Quote
  #3  
Old February 20th, 2013, 08:50 AM
w3l54666 w3l54666 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 52 w3l54666 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 14 h 19 m 25 sec
Reputation Power: 1
i can post the current php code here, but what i was wanting was to post my website link here, so they could see what i was on about, but new people cant post links.

i am a newbie at php so im kind of confused at what i need to do to get it working.

Reply With Quote
  #4  
Old February 20th, 2013, 09:03 AM
ManiacDan's Avatar
ManiacDan ManiacDan is offline
Likely to be eaten by a grue.
Dev Shed God 10th Plane (9500 - 9999 posts)
 
Join Date: Oct 2006
Location: Pennsylvania, USA
Posts: 9,796 ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)ManiacDan User rank is General 77th Grade (Above 100000 Reputation Level)  Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1Folding Points: 127430 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 3 Weeks 15 h 17 m 36 sec
Reputation Power: 6112
What do you mean by "layout"? Why is the layout (traditionally referring to the CSS styling of the site) affecting your MySQL connection?

What, exactly, is the problem? You're trying to move a whole set of code from one server to another? You're trying to make a second website using code from the first? You're trying to change the underlying database structure of a site?

You can post URLs with (dot) and (slash) and we'll reassemble them if you really need to, but I'm not sure what a link is going to do for us since the question isn't really clear.
__________________
HEY! YOU! Read the New User Guide and Forum Rules

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

Reply With Quote
  #5  
Old February 20th, 2013, 09:03 AM
gw1500se gw1500se is online now
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2003
Posts: 2,875 gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Year 1 Week 6 Days 1 h 5 m 57 sec
Reputation Power: 581
Post your code here (that is what this forum is for). Be sure to use [ PHP ] tags (see the sticky at the top of this forum). After posting, explain what is going wrong and where, along with any errors you are getting (especially in the httpd log).

P.S. You might run phpinfo on both servers and compare the result.

Reply With Quote
  #6  
Old February 20th, 2013, 09:20 AM
w3l54666 w3l54666 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 52 w3l54666 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 14 h 19 m 25 sec
Reputation Power: 1
<?php

// You only need a single query to draw all the news section
// Remember that Limit number -currently 2- is just the news items you want to show in the main index

$data = mysql_query("SELECT id, day, month, year, headline, text, signature, img1, img2, img3 FROM news ORDER by ID DESC LIMIT 2", $CONNECT);
while($row = mysql_fetch_row($data))
{

echo "
<div class='article'>
<h2>$row[4]...</h2>
<p class='infopost'>Posted <span class='date'>on $row[1]/$row[2]/$row[3]</span> by <a href='#'>$row[6]</a> &nbsp;&nbsp;|&nbsp;&nbsp; &nbsp;&nbsp; </p>
<div class='clr'></div>
<div class='img'><img src='$row[7]' width='200' height='150' alt='' class='fl' /><Br /><BR /><BR />
<img src='$row[8]' width='200' height='150' alt='' class='fl' /><Br /><BR /><BR />
<img src='$row[9]' width='200' height='150' alt='' class='fl' /></div>
<div class='post_content'>
$row[5]

<p>&nbsp;</p>
<p>&nbsp;</p>

</div>
<div class='clr'></div>
</div>";
}

?>


thats the php code im using at the moment...

but i cannot get it changed to fit this page...
www(dot)draigracing(dot)co.uk(slash)news(dot)html

the layout of the page designs are completely different.

Reply With Quote
  #7  
Old February 20th, 2013, 09:29 AM
Triple_Nothing Triple_Nothing is online now
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2009
Posts: 294 Triple_Nothing User rank is Corporal (100 - 500 Reputation Level)Triple_Nothing User rank is Corporal (100 - 500 Reputation Level)Triple_Nothing User rank is Corporal (100 - 500 Reputation Level)Triple_Nothing User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 Days 8 h 8 m 47 sec
Reputation Power: 5
When you say to fit, what to you mean? Dimensions are probably in your css file within the .article or .infopost area.


EDIT: Or even .post_content

Reply With Quote
  #8  
Old February 20th, 2013, 10:26 AM
w3l54666 w3l54666 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 52 w3l54666 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 14 h 19 m 25 sec
Reputation Power: 1
ok let me try and clarify what i mean...

that code is for this...

www(dot)draigracing(dot)co(dot)uk

and i want to change it to work on this page some how

http://draigracing(dot)co(dot)uk(slash)Draigracingnewsite(slash)news(dot)html

Reply With Quote
  #9  
Old February 20th, 2013, 11:58 AM
Jacques1's Avatar
Jacques1 Jacques1 is online now
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,851 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 12 h 19 m 13 sec
Reputation Power: 813
Is this your problem? Do you see an error message on your screen?

That would explain why your "layout" is somehow messed up ...

Reply With Quote
  #10  
Old February 20th, 2013, 12:01 PM
w3l54666 w3l54666 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 52 w3l54666 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 14 h 19 m 25 sec
Reputation Power: 1
Quote:
Originally Posted by Jacques1
Is this your problem? Do you see an error message on your screen?

That would explain why your "layout" is somehow messed up ...


that was my error i thought it was a mysql error as it said couldnt get it, but sorted that out it was a comma that needed to be deleted

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > New to php, problems moving my code to a new site as layout is different.

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap